Examples of BindingSource


Examples of org.apache.tapestry.services.BindingSource

    }

    @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();

        model.addParameter("value", false, TapestryConstants.PROP_BINDING_PREFIX);

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

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

                resources.bindParameter("value", binding);

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

Examples of org.apache.tapestry.services.BindingSource

    }

    @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

Examples of org.apache.tapestry.services.BindingSource

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

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map);

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

Examples of org.apache.tapestry.services.BindingSource

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

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map);

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

Examples of org.apache.tapestry.services.BindingSource

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

        map.put("prop", factory);

        BindingSource source = new BindingSourceImpl(map);

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

Examples of org.apache.tapestry.services.BindingSource

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

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map);

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

Examples of org.apache.tapestry.services.BindingSource

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

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map);

        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

Examples of org.apache.tapestry.services.BindingSource

        ComponentResources resources = mockComponentResources();
        Component container = mockComponent();
        PropertyAccess access = mockPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = mockClassPropertyAdapter();
        BindingSource bindingSource = mockBindingSource();

        train_getId(resources, id);
        train_getContainer(resources, container);

        train_getAdapter(access, container, classPropertyAdapter);
View Full Code Here

Examples of org.apache.tapestry.services.BindingSource

        ComponentResources resources = mockComponentResources();
        Component container = mockComponent();
        PropertyAccess access = mockPropertyAccess();
        ClassPropertyAdapter classPropertyAdapter = mockClassPropertyAdapter();
        PropertyAdapter propertyAdapter = mockPropertyAdapter();
        BindingSource bindingSource = mockBindingSource();
        Binding binding = mockBinding();
        ComponentResources containerResources = mockComponentResources();

        train_getId(resources, id);
        train_getContainer(resources, container);
View Full Code Here

Examples of org.apache.tapestry.services.BindingSource

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

        map.put(defaultPrefix, factory);

        BindingSource source = new BindingSourceImpl(map);

        Binding actual = source.newBinding(
                description,
                container,
                component,
                defaultPrefix,
                expression,
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.