Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.ComponentDefaultProvider


                id,
                binding);

        replay();

        ComponentDefaultProvider source = new ComponentDefaultProviderImpl(access, bindingSource, null,
                                                                           null);

        assertSame(source.defaultBinding(parameterName, resources), binding);

        verify();
    }
View Full Code Here


        train_getBoundType(resources, "object", null);

        replay();

        ComponentDefaultProvider provider = new ComponentDefaultProviderImpl(null, null, null, source);

        assertNull(provider.defaultTranslator("object", resources));

        verify();
    }
View Full Code Here

        expect(source.findByType(Integer.class)).andReturn(translator);

        replay();

        ComponentDefaultProvider provider = new ComponentDefaultProviderImpl(null, null, null, source);

        assertSame(provider.defaultTranslator("object", resources), translator);

        verify();
    }
View Full Code Here

        train_contains(messages, key, true);
        train_get(messages, key, message);

        replay();

        ComponentDefaultProvider provider = new ComponentDefaultProviderImpl(null, null, null, null, null);

        assertSame(provider.defaultLabel(resources), message);

        verify();
    }
View Full Code Here

        train_getMessages(container, messages);
        train_contains(messages, key, false);

        replay();

        ComponentDefaultProvider provider = new ComponentDefaultProviderImpl(null, null, null, null, null);

        assertEquals(provider.defaultLabel(resources), "My Field");

        verify();
    }
View Full Code Here

        train_getAdapter(access, container, classPropertyAdapter);
        train_getPropertyAdapter(classPropertyAdapter, id, null);

        replay();

        ComponentDefaultProvider source = new ComponentDefaultProviderImpl(access, bindingSource, null,
                                                                           null, null);

        assertNull(source.defaultBinding(parameterName, resources));

        verify();
    }
View Full Code Here

                id,
                binding);

        replay();

        ComponentDefaultProvider source = new ComponentDefaultProviderImpl(access, bindingSource, null,
                                                                           null, null);

        assertSame(source.defaultBinding(parameterName, resources), binding);

        verify();
    }
View Full Code Here

        train_createDefaultTranslator(source, resources, "object", null);

        replay();

        ComponentDefaultProvider provider = new ComponentDefaultProviderImpl(null, null, null, source, null);

        assertNull(provider.defaultTranslator("object", resources));

        verify();
    }
View Full Code Here

        train_createDefaultTranslator(source, resources, "object", translator);

        replay();

        ComponentDefaultProvider provider = new ComponentDefaultProviderImpl(null, null, null, source, null);

        assertSame(provider.defaultTranslator("object", resources), translator);

        verify();
    }
View Full Code Here

    public void parameter_with_default() throws Exception
    {
        final BindingSource source = mockBindingSource();
        final InternalComponentResources resources = mockInternalComponentResources();
        final Binding binding = mockBinding();
        ComponentDefaultProvider defaultProvider = newMock(ComponentDefaultProvider.class);
        String boundValue = "howdy!";
        final Logger logger = mockLogger();

        MutableComponentModel model = mockMutableComponentModel(logger);
View Full Code Here

TOP

Related Classes of org.apache.tapestry5.services.ComponentDefaultProvider

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.