use of org.robobinding.ViewResolutionErrorsException in project RoboBinding by RoboBinding.
the class ResolutionTest method givenASingleView_whenResolvingMissingGroupBindingAttributes_thenThrowExceptionReferencingView.
@Test
public void givenASingleView_whenResolvingMissingGroupBindingAttributes_thenThrowExceptionReferencingView() {
PendingAttributesForView pendingAttributesForAdapterView = aPendingAttributesForAdapterView().withAttribute("source", "{names}").build();
try {
resolveBindingAttributes(pendingAttributesForAdapterView);
fail("Expected exception to be thrown");
} catch (ViewResolutionErrorsException e) {
assertThat(e.getView(), equalTo(pendingAttributesForAdapterView.getView()));
assertThat(e.getMissingRequiredAttributeErrors().size(), is(1));
}
}
Aggregations