use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.
the class ChildViewAttributesBuilderImpl method add.
@Override
public void add(String attributeName, OneWayMultiTypePropertyViewAttributeFactory<ViewType> factory) {
ValueModelAttribute attribute = resolvedGroupAttributes.valueModelAttributeFor(attributeName);
MultiTypePropertyViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(factory, attribute);
childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.
the class ChildViewAttributesBuilderImpl method add.
@Override
public void add(String attributeName, TwoWayMultiTypePropertyViewAttribute<ViewType> viewAttribute) {
ValueModelAttribute attribute = resolvedGroupAttributes.valueModelAttributeFor(attributeName);
MultiTypePropertyViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(viewAttribute, attribute);
childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.
the class ChildViewAttributesBuilderImpl method add.
@Override
public void add(String attributeName, TwoWayMultiTypePropertyViewAttributeFactory<ViewType> factory) {
ValueModelAttribute attribute = resolvedGroupAttributes.valueModelAttributeFor(attributeName);
MultiTypePropertyViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(factory, attribute);
childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.
the class ChildViewAttributesBuilderImpl method add.
@Override
public void add(String attributeName, OneWayMultiTypePropertyViewAttribute<ViewType> viewAttribute) {
ValueModelAttribute attribute = resolvedGroupAttributes.valueModelAttributeFor(attributeName);
MultiTypePropertyViewAttributeBinder viewAttributeBinder = viewAttributeBinderFactory.binderFor(viewAttribute, attribute);
childViewAttributeMap.put(attributeName, viewAttributeBinder);
}
use of org.robobinding.viewattribute.property.MultiTypePropertyViewAttributeBinder in project RoboBinding by RoboBinding.
the class ByBindingAttributeMappingsResolverTest method givenAMultiTypePropertyAttribute_whenResolve_thenAResolvedMultiTypePropertyViewAttributeShouldBeReturned.
@Test
public void givenAMultiTypePropertyAttribute_whenResolve_thenAResolvedMultiTypePropertyViewAttributeShouldBeReturned() {
MultiTypePropertyViewAttributeBinder viewAttributeBinder = Mockito.mock(MultiTypePropertyViewAttributeBinder.class);
ByBindingAttributeMappingsResolver byBindingAttributeMappingsResolver = newByBindingAttributeMappingsResolver(aBindingAttributeMappings().withMultiTypePropertyAttribute("multiTypePropertyAttribute", viewAttributeBinder).build());
Collection<ViewAttributeBinder> viewAttributes = byBindingAttributeMappingsResolver.resolve(pendingAttributesForView);
assertThat(Sets.newHashSet(viewAttributes), equalTo(Sets.<ViewAttributeBinder>newHashSet(viewAttributeBinder)));
}
Aggregations