Search in sources :

Example 1 with InternalPropBinding

use of org.apache.tapestry5.internal.bindings.InternalPropBinding in project tapestry-5 by apache.

the class InternalComponentResourcesImplTest method get_property_name_internal_prop_binding.

@Test
public void get_property_name_internal_prop_binding() {
    Component component = mockComponent();
    Instantiator ins = mockInstantiator(component);
    ComponentModel model = mockComponentModel();
    ComponentPageElement element = mockComponentPageElement();
    Page page = mockPage();
    InternalPropBinding binding = newMock(InternalPropBinding.class);
    train_getModel(ins, model);
    expect(binding.getPropertyName()).andReturn("foo");
    replay();
    InternalComponentResources resources = new InternalComponentResourcesImpl(page, element, null, null, null, null, ins, false);
    resources.bindParameter("bar", binding);
    assertEquals(resources.getPropertyName("bar"), "foo");
    verify();
}
Also used : InternalPropBinding(org.apache.tapestry5.internal.bindings.InternalPropBinding) InternalComponentResources(org.apache.tapestry5.internal.InternalComponentResources) ComponentModel(org.apache.tapestry5.model.ComponentModel) Instantiator(org.apache.tapestry5.internal.services.Instantiator) Component(org.apache.tapestry5.runtime.Component) Test(org.testng.annotations.Test)

Aggregations

InternalComponentResources (org.apache.tapestry5.internal.InternalComponentResources)1 InternalPropBinding (org.apache.tapestry5.internal.bindings.InternalPropBinding)1 Instantiator (org.apache.tapestry5.internal.services.Instantiator)1 ComponentModel (org.apache.tapestry5.model.ComponentModel)1 Component (org.apache.tapestry5.runtime.Component)1 Test (org.testng.annotations.Test)1