use of com.reactnativenavigation.options.layout.LayoutInsets in project react-native-navigation by wix.
the class PresenterTest method shouldApplyInsetsOnTopMostParent.
@Test
public void shouldApplyInsetsOnTopMostParent() {
final ViewGroup spy = Mockito.mock(ViewGroup.class);
Mockito.when(spy.getLayoutParams()).thenReturn(new ViewGroup.LayoutParams(0, 0));
Mockito.when(controller.getView()).thenReturn(spy);
Options options = new Options();
options.layout.setInsets(new LayoutInsets(1, 2, 3, 4));
uut.applyOptions(controller, options);
verify(parentView).setPadding(2, 1, 4, 3);
}
use of com.reactnativenavigation.options.layout.LayoutInsets in project react-native-navigation by wix.
the class PresenterTest method shouldMergeInsetsOnTopMostParent.
@Test
public void shouldMergeInsetsOnTopMostParent() {
final ViewGroup spy = Mockito.mock(ViewGroup.class);
Mockito.when(spy.getLayoutParams()).thenReturn(new ViewGroup.LayoutParams(0, 0));
Mockito.when(controller.getView()).thenReturn(spy);
Mockito.when(controller.resolveCurrentOptions()).thenReturn(Options.EMPTY);
Options options = new Options();
options.layout.setInsets(new LayoutInsets(1, 2, 3, 4));
uut.mergeOptions(controller, options);
verify(parentView).setPadding(2, 1, 4, 3);
}
Aggregations