Package org.apache.tapestry5.services

Examples of org.apache.tapestry5.services.BindingSource


    public void unclosed_attribute_expression()
    {
        ComponentInstantiatorSource source = mockComponentInstantiatorSource();
        ComponentClassResolver resolver = mockComponentClassResolver();
        TypeCoercer typeCoercer = mockTypeCoercer();
        BindingSource bindingSource = mockBindingSource();
        ComponentMessagesSource messagesSource = newMock(ComponentMessagesSource.class);
        ComponentResources resources = mockComponentResources();
        Location location = mockLocation();

        AttributeToken token = new AttributeToken(null, "fred", "${flintstone", location);
View Full Code Here


        Map<String, BindingFactory> map = newMap();

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map, interner);

        Binding actual = source.newBinding(
                description,
                container,
                component,
                defaultPrefix,
                expression,
View Full Code Here

        Map<String, BindingFactory> map = newMap();

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map, interner);

        Binding actual = source.newBinding(
                description,
                container,
                component,
                defaultPrefix,
                expression,
View Full Code Here

        Map<String, BindingFactory> map = newMap();

        map.put("prop", factory);

        BindingSource source = new BindingSourceImpl(map, interner);

        Binding actual = source.newBinding(
                description,
                container,
                component,
                defaultPrefix,
                "prop:myproperty",
View Full Code Here

        Map<String, BindingFactory> map = newMap();

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map, interner);

        try
        {
            source.newBinding(description, container, component, defaultPrefix, expression, l);
            unreachable();
        }
        catch (TapestryException ex)
        {
            assertTrue(ex.getMessage().contains(
View Full Code Here

        Map<String, BindingFactory> map = newMap();

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map, interner);

        try
        {
            source.newBinding(description, container, component, defaultPrefix, expression, l);
        }
        catch (TapestryException ex)
        {
            assertEquals(ex.getMessage(), "Parameter 'wilma' must have a non-empty binding.");
            assertSame(ex.getLocation(), l);
View Full Code Here

    @Test
    public void attribute()
    {
        TypeCoercer typeCoercer = mockTypeCoercer();
        BindingSource bindingSource = mockBindingSource();
        MarkupWriter writer = new MarkupWriterImpl(xmlModel);
        Location l = mockLocation();
        RenderQueue queue = mockRenderQueue();

        replay();
View Full Code Here

    @Test
    public void unclosed_attribute_expression()
    {
        TypeCoercer typeCoercer = mockTypeCoercer();
        BindingSource bindingSource = mockBindingSource();
        ComponentResources resources = mockComponentResources();
        Location location = mockLocation();

        AttributeToken token = new AttributeToken(null, "fred", "${flintstone", location);
View Full Code Here

    }

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

        MutableComponentModel model = mockMutableComponentModel(logger);

        model.addParameter("value", false, BindingConstants.PROP);

        Runnable phaseTwoTraining = new Runnable()
        {
            public void run()
            {
                train_isBound(resources, "value", false);

                expect(source.newBinding("default value", resources, BindingConstants.PROP,
                                         "literal:greeting")).andReturn(binding);

                resources.bindParameter("value", binding);

                train_isInvariant(resources, "value", true);
View Full Code Here

    }

    @Test
    public void default_binding_method() throws Exception
    {
        BindingSource source = mockBindingSource();
        final InternalComponentResources resources = mockInternalComponentResources();
        _binding = mockBinding();
        String boundValue = "yowza!";
        final Logger logger = mockLogger();
View Full Code Here

TOP

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

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.