use of org.robobinding.viewattribute.event.EventViewAttributeBinder in project RoboBinding by RoboBinding.
the class ChildViewAttributesBuilderImpl method add.
@Override
public void add(String attributeName, EventViewAttribute<ViewType, ? extends ViewAddOn> viewAttribute) {
EventAttribute attribute = resolvedGroupAttributes.eventAttributeFor(attributeName);
EventViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(viewAttribute, attribute);
childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
use of org.robobinding.viewattribute.event.EventViewAttributeBinder in project RoboBinding by RoboBinding.
the class ByBindingAttributeMappingsResolverTest method givenAnEventAttribute_whenResolve_thenAResolvedEventViewAttributeShouldBeReturned.
@Test
public void givenAnEventAttribute_whenResolve_thenAResolvedEventViewAttributeShouldBeReturned() {
EventViewAttributeBinder viewAttributeBinder = Mockito.mock(EventViewAttributeBinder.class);
ByBindingAttributeMappingsResolver byBindingAttributeMappingsResolver = newByBindingAttributeMappingsResolver(aBindingAttributeMappings().withEventAttribute("eventAttribute", viewAttributeBinder).build());
Collection<ViewAttributeBinder> viewAttributes = byBindingAttributeMappingsResolver.resolve(pendingAttributesForView);
assertThat(Sets.newHashSet(viewAttributes), equalTo(Sets.<ViewAttributeBinder>newHashSet(viewAttributeBinder)));
}
use of org.robobinding.viewattribute.event.EventViewAttributeBinder in project RoboBinding by RoboBinding.
the class MockInitializedBindingAttributeMappingsBuilder method withEventAttribute.
public MockInitializedBindingAttributeMappingsBuilder withEventAttribute(String attribute, final EventViewAttributeBinder viewAttributeBinder) {
eventAttributes.add(attribute);
eventViewAttributeBinderFactoryMap.put(attribute, new EventViewAttributeBinderFactory(null, null) {
@Override
public EventViewAttributeBinder create(Object view, String attributeName, String attributeValue) {
return viewAttributeBinder;
}
});
return this;
}
use of org.robobinding.viewattribute.event.EventViewAttributeBinder in project RoboBinding by RoboBinding.
the class ChildViewAttributesBuilderImpl method add.
@Override
public void add(String attributeName, EventViewAttributeFactory<ViewType> factory) {
EventAttribute attribute = resolvedGroupAttributes.eventAttributeFor(attributeName);
EventViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(factory, attribute);
childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
Aggregations