Package org.apache.tapestry.ioc.def

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


    @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

    @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

    }

    @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

        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

        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

                .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

        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

        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

{
    @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

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.