Package org.apache.tapestry.ioc.def

Examples of org.apache.tapestry.ioc.def.ContributionDef


    private static final String SERVICE_ID = "Baz";

    @Test
    public void proper_key_and_value()
    {
        ContributionDef def = mockContributionDef();
        Logger logger = mockLogger();
        Map<Class, ContributionDef> keyToContribution = newMap();
        MappedConfiguration<Class, Runnable> delegate = mockMappedConfiguration();

        Class key = Integer.class;
View Full Code Here


    }

    @Test
    public void duplicate_key()
    {
        ContributionDef def1 = newContributionDef("contributionPlaceholder1");
        ContributionDef def2 = newContributionDef("contributionPlaceholder2");
        Logger logger = mockLogger();
        Map<Class, ContributionDef> keyToContribution = newMap();

        keyToContribution.put(Integer.class, def1);
View Full Code Here

    }

    @Test
    public void null_key()
    {
        ContributionDef def = newContributionDef("contributionPlaceholder1");
        Logger logger = mockLogger();
        Map<Class, ContributionDef> keyToContribution = newMap();
        MappedConfiguration<Class, Runnable> delegate = mockMappedConfiguration();
        Runnable value = mockRunnable();
View Full Code Here

    @SuppressWarnings("unchecked")
    @Test
    public void wrong_key_type()
    {
        ContributionDef def = newContributionDef("contributionPlaceholder1");
        Logger logger = mockLogger();
        Map<?, ContributionDef> keyToContribution = newMap();
        MappedConfiguration delegate = mockMappedConfiguration();
        Runnable value = mockRunnable();
View Full Code Here

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

        logger.warn(IOCMessages.contributionWrongValueType(
View Full Code Here

    }

    @Test
    public void null_value()
    {
        ContributionDef def = newContributionDef("contributionPlaceholder1");
        Logger logger = mockLogger();
        Map<Class, ContributionDef> keyToContribution = newMap();
        MappedConfiguration<Class, Runnable> delegate = mockMappedConfiguration();

        logger.warn(IOCMessages.contributionWasNull(SERVICE_ID, def));
View Full Code Here

{
    @SuppressWarnings("unchecked")
    @Test
    public void valid_contribution()
    {
        ContributionDef def = mockContributionDef();
        Logger logger = mockLogger();
        Configuration configuration = mockConfiguration();
        Runnable value = mockRunnable();

        configuration.add(value);
View Full Code Here

    @Test
    public void null_contribution()
    {
        Logger logger = mockLogger();
        Configuration configuration = mockConfiguration();
        ContributionDef def = new ContributionDefImpl("Bar", findMethod("contributeUnorderedNull"),
                                                      getClassFactory());

        logger.warn(IOCMessages.contributionWasNull("Bar", def));

        replay();
View Full Code Here

    @Test
    public void wrong_type_of_contribution()
    {
        Logger logger = mockLogger();
        Configuration configuration = mockConfiguration();
        ContributionDef def = new ContributionDefImpl("Bar", findMethod("contributeUnorderedNull"),
                                                      getClassFactory());

        logger.warn(IOCMessages
                .contributionWrongValueType("Bar", def, String.class, Runnable.class));
View Full Code Here

public class ValidatingOrderedConfigurationWrapperTest extends IOCInternalTestCase
{
    @Test
    public void valid_type_long_form()
    {
        ContributionDef def = mockContributionDef();
        Logger logger = mockLogger();
        OrderedConfiguration<Runnable> configuration = mockOrderedConfiguration();
        Runnable contribution = mockRunnable();

        configuration.add("id", contribution, "after:pre", "before:post");
View Full Code Here

TOP

Related Classes of org.apache.tapestry.ioc.def.ContributionDef

Copyright © 2018 www.massapicom. 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.