Package org.apache.tapestry5.ioc

Examples of org.apache.tapestry5.ioc.ObjectLocator


    {
        ObjectProvider prov1 = mockObjectProvider();
        ObjectProvider prov2 = mockObjectProvider();
        Class type = Runnable.class;
        AnnotationProvider ap = mockAnnotationProvider();
        ObjectLocator locator = mockObjectLocator();
        Object expected = mockRunnable();

        train_provide(prov1, type, ap, locator, null);
        train_provide(prov2, type, ap, locator, null);
View Full Code Here


        Logger logger = mockLogger();
        Orderer<Map> orderer = new Orderer<Map>(logger);
        Map pre = new HashMap();
        Map post = new HashMap();
        HashMap contribution = new HashMap();
        ObjectLocator locator = mockObjectLocator();

        train_autobuild(locator, HashMap.class, contribution);

        orderer.add("pre", pre);
        orderer.add("post", post);
View Full Code Here

    @SuppressWarnings({"unchecked"})
    @Test
    public void valid_class_contribution()
    {
        ObjectLocator locator = mockObjectLocator();
        final HashMap value = new HashMap();
        train_autobuild(locator, HashMap.class, value);
        List<Map> collection = CollectionFactory.newList();

        replay();
View Full Code Here

    @Test
    public void proper_key_and_value()
    {
        ContributionDef def = mockContributionDef();
        Map<Class, ContributionDef> keyToContribution = newMap();
        ObjectLocator locator = mockObjectLocator();
        Map<Class, Runnable> map = CollectionFactory.newMap();

        Class key = Integer.class;
        Runnable value = mockRunnable();
View Full Code Here

    public void duplicate_key()
    {
        ContributionDef def1 = newContributionDef("contributionPlaceholder1");
        ContributionDef def2 = newContributionDef("contributionPlaceholder2");
        Map<Class, ContributionDef> keyToContribution = newMap();
        ObjectLocator locator = mockObjectLocator();
        Map<Class, Runnable> map = CollectionFactory.newMap();

        keyToContribution.put(Integer.class, def1);

        Class key = Integer.class;
View Full Code Here

    public void null_key()
    {
        ContributionDef def = newContributionDef("contributionPlaceholder1");
        Map<Class, ContributionDef> keyToContribution = newMap();
        Runnable value = mockRunnable();
        ObjectLocator locator = mockObjectLocator();
        Map<Class, Runnable> map = CollectionFactory.newMap();

        replay();

        MappedConfiguration<Class, Runnable> wrapper = new ValidatingMappedConfigurationWrapper<Class, Runnable>(
View Full Code Here

    public void wrong_key_type()
    {
        ContributionDef def = newContributionDef("contributionPlaceholder1");
        Map<?, ContributionDef> keyToContribution = CollectionFactory.newMap();
        Runnable value = mockRunnable();
        ObjectLocator locator = mockObjectLocator();
        Map<Class, Runnable> map = CollectionFactory.newMap();

        replay();

        MappedConfiguration wrapper = new ValidatingMappedConfigurationWrapper(map, null, SERVICE_ID, def,
View Full Code Here

    @Test
    public void wrong_value_type()
    {
        ContributionDef def = newContributionDef("contributionPlaceholder1");
        Map<?, ContributionDef> keyToContribution = CollectionFactory.newMap();
        ObjectLocator locator = mockObjectLocator();
        Map<Class, Runnable> map = CollectionFactory.newMap();


        replay();
View Full Code Here

    public void null_value()
    {
        ContributionDef def = newContributionDef("contributionPlaceholder1");
        Map<Class, ContributionDef> keyToContribution = CollectionFactory.newMap();
        Map<Class, Runnable> map = CollectionFactory.newMap();
        ObjectLocator locator = mockObjectLocator();

        replay();

        MappedConfiguration<Class, Runnable> wrapper = new ValidatingMappedConfigurationWrapper<Class, Runnable>(
                map, null, SERVICE_ID, def, Class.class, Runnable.class, keyToContribution, locator);
View Full Code Here

    @Test
    public void not_type_block()
    {
        ClassTransformation ct = mockClassTransformation();
        MutableComponentModel model = mockMutableComponentModel();
        ObjectLocator locator = mockObjectLocator();

        replay();

        InjectionProvider provider = new BlockInjectionProvider();
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.ioc.ObjectLocator

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.