|
@@ -263,14 +263,18 @@ public class SideMenuControllerTest extends BaseTest {
|
263
|
263
|
}
|
264
|
264
|
|
265
|
265
|
private void openDrawerAndAssertVisibility(ViewController side, Functions.FuncR1<ViewController, SideMenuOptions> opt) {
|
266
|
|
- assertThat(opt.run(side).visible.isTrue()).isFalse();
|
267
|
|
- uut.onDrawerOpened(side.getView());
|
268
|
|
- assertThat(opt.run(side).visible.isTrue()).isTrue();
|
|
266
|
+ Options options = new Options();
|
|
267
|
+ (side == left ? options.sideMenuRootOptions.left : options.sideMenuRootOptions.right).visible = new Bool(true);
|
|
268
|
+ uut.mergeOptions(options);
|
|
269
|
+ assertThat(uut.getView().isDrawerVisible(side.getView())).isTrue();
|
|
270
|
+ assertThat(opt.run(side).visible.isFalseOrUndefined()).isTrue();
|
269
|
271
|
}
|
270
|
272
|
|
271
|
273
|
private void closeDrawerAndAssertVisibility(ViewController side, Functions.FuncR1<ViewController, SideMenuOptions> opt) {
|
272
|
|
- assertThat(opt.run(side).visible.isTrue()).isTrue();
|
273
|
|
- uut.onDrawerClosed(side.getView());
|
|
274
|
+ Options options = new Options();
|
|
275
|
+ (side == left ? options.sideMenuRootOptions.left : options.sideMenuRootOptions.right).visible = new Bool(false);
|
|
276
|
+ uut.mergeOptions(options);
|
|
277
|
+ assertThat(uut.getView().isDrawerVisible(side.getView())).isFalse();
|
274
|
278
|
assertThat(opt.run(side).visible.isTrue()).isFalse();
|
275
|
279
|
}
|
276
|
280
|
|