Examples of MappedConfiguration


Examples of org.apache.tapestry5.ioc.MappedConfiguration

        Map<Class, Runnable> map = CollectionFactory.newMap();


        replay();

        MappedConfiguration wrapper = new ValidatingMappedConfigurationWrapper(Runnable.class, locator, map, null,
                                                                               SERVICE_ID, def,
                                                                               Class.class, keyToContribution);

        try
        {
            wrapper.add(List.class, "do something");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

Examples of org.apache.tapestry5.ioc.MappedConfiguration

        ObjectLocator locator = mockObjectLocator();
        Map<Class, Runnable> map = CollectionFactory.newMap();

        replay();

        MappedConfiguration wrapper = new ValidatingMappedConfigurationWrapper(map, null, SERVICE_ID, def,
                                                                               Class.class, Runnable.class,
                                                                               keyToContribution, locator);

        try
        {
            wrapper.add("java.util.List", value);
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

Examples of org.apache.tapestry5.ioc.MappedConfiguration

        Map<Class, Runnable> map = CollectionFactory.newMap();


        replay();

        MappedConfiguration wrapper = new ValidatingMappedConfigurationWrapper(map, null, SERVICE_ID, def,
                                                                               Class.class, Runnable.class,
                                                                               keyToContribution, locator);

        try
        {
            wrapper.add(List.class, "do something");
            unreachable();
        }
        catch (IllegalArgumentException ex)
        {
            assertEquals(ex.getMessage(),
View Full Code Here

Examples of org.apache.tapestry5.ioc.MappedConfiguration

    public void wrong_key_type()
    {
        ContributionDef def = newContributionDef("contributionPlaceholder1");
        Logger logger = mockLogger();
        Map<?, ContributionDef> keyToContribution = newMap();
        MappedConfiguration delegate = mockMappedConfiguration();
        Runnable value = mockRunnable();

        logger.warn(IOCMessages
                .contributionWrongKeyType(SERVICE_ID, def, String.class, Class.class));

        replay();

        MappedConfiguration wrapper = new ValidatingMappedConfigurationWrapper(SERVICE_ID, def,
                                                                               logger, Class.class, Runnable.class,
                                                                               keyToContribution, delegate);

        wrapper.add("java.util.List", value);

        verify();
    }
View Full Code Here

Examples of org.apache.tapestry5.ioc.MappedConfiguration

    public void wrong_value_type()
    {
        ContributionDef def = newContributionDef("contributionPlaceholder1");
        Logger logger = mockLogger();
        Map<?, ContributionDef> keyToContribution = newMap();
        MappedConfiguration delegate = mockMappedConfiguration();

        logger.warn(IOCMessages.contributionWrongValueType(
                SERVICE_ID,
                def,
                String.class,
                Runnable.class));

        replay();

        MappedConfiguration wrapper = new ValidatingMappedConfigurationWrapper(SERVICE_ID, def,
                                                                               logger, Class.class, Runnable.class,
                                                                               keyToContribution, delegate);

        wrapper.add(List.class, "do something");

        verify();
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.