Examples of ContributionDef


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

    }

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

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

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

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

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

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

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

    }

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

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

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

        configuration.add(_toContribute);

        replay();

        Method m = findMethod("contributeUnordered");
        ContributionDef def = new ContributionDefImpl("foo.Bar", m, null);

        def.contribute(this, locator, configuration);

        verify();
    }
View Full Code Here

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

        configuration.add(service);

        replay();

        Method m = findMethod("contributeUnorderedParameter");
        ContributionDef def = new ContributionDefImpl("foo.Bar", m, null);

        def.contribute(this, locator, configuration);

        verify();
    }
View Full Code Here

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

                .andThrow(t);

        replay();

        Method m = findMethod("contributeUnorderedWrongParameter");
        ContributionDef def = new ContributionDefImpl("foo.Bar", m, null);

        try
        {
            def.contribute(this, locator, configuration);
            unreachable();
        }
        catch (RuntimeException ex)
        {
            assertEquals(ex.getMessage(), "Error invoking service contribution method "
View Full Code Here

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

        configuration.add("fred", service);

        replay();

        Method m = findMethod("contributeOrderedParameter");
        ContributionDef def = new ContributionDefImpl("foo.Bar", m, null);

        def.contribute(this, locator, configuration);

        verify();
    }
View Full Code Here

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

        configuration.add("upcase", service);

        replay();

        Method m = findMethod("contributeMappedParameter");
        ContributionDef def = new ContributionDefImpl("foo.Bar", m, null);

        def.contribute(this, locator, configuration);

        verify();
    }
View Full Code Here

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

{
    @SuppressWarnings("unchecked")
    @Test
    public void valid_contribution()
    {
        ContributionDef def = mockContributionDef();
        Log log = mockLog();
        Configuration configuration = mockConfiguration();
        Runnable value = mockRunnable();

        configuration.add(value);
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.