@Test(dataProvider = "values") public void special_prop_binding_values(String expression, Object expected) { Location l = mockLocation(); String description = "my description"; ComponentResources resources = mockComponentResources(); Component component = mockComponent(); train_getComponent(resources, component); train_getCompleteId(resources, "Does.not.matter"); replay(); Binding binding = factory.newBinding(description, resources, null, expression, l); assertEquals(binding.get(), expected); assertTrue(binding.isInvariant()); verify(); }
public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); }
PropBindingFactory implements BindingFactory { public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); } }
PropBindingFactory implements BindingFactory { public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); } PropBindingFactory(PropertyConduitSource propertyConduitSource, StringInterner interner); }
PropBindingFactory implements BindingFactory { public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); } PropBindingFactory(PropertyConduitSource propertyConduitSource, StringInterner interner); Binding newBinding(String description, ComponentResources container,
                              ComponentResources component, String expression, Location location); }
PropBindingFactory implements BindingFactory { public Binding newBinding(String description, ComponentResources container, ComponentResources component, String expression, Location location) { Object target = container.getComponent(); Class targetClass = target.getClass(); PropertyConduit conduit = source.create(targetClass, expression); String toString = interner.format("PropBinding[%s %s(%s)]", description, container .getCompleteId(), expression); return new PropBinding(location, target, conduit, expression, toString); } PropBindingFactory(PropertyConduitSource propertyConduitSource, StringInterner interner); Binding newBinding(String description, ComponentResources container,
                              ComponentResources component, String expression, Location location);  }