|
@@ -65,14 +65,14 @@ public class NavigatorTest extends BaseTest {
|
65
|
65
|
public void setRoot_AddsChildControllerView() {
|
66
|
66
|
assertThat(uut.getView().getChildCount()).isZero();
|
67
|
67
|
uut.setRoot(child1, new MockPromise());
|
68
|
|
- assertIsChildById(uut.getView(), child1.getView());
|
|
68
|
+ assertIsChild(uut.getView(), child1.getView());
|
69
|
69
|
}
|
70
|
70
|
|
71
|
71
|
@Test
|
72
|
72
|
public void setRoot_ReplacesExistingChildControllerViews() {
|
73
|
73
|
uut.setRoot(child1, new MockPromise());
|
74
|
74
|
uut.setRoot(child2, new MockPromise());
|
75
|
|
- assertIsChildById(uut.getView(), child2.getView());
|
|
75
|
+ assertIsChild(uut.getView(), child2.getView());
|
76
|
76
|
}
|
77
|
77
|
|
78
|
78
|
@Test
|
|
@@ -87,20 +87,20 @@ public class NavigatorTest extends BaseTest {
|
87
|
87
|
stackController.push(child1, new CommandListenerAdapter());
|
88
|
88
|
uut.setRoot(stackController, new MockPromise());
|
89
|
89
|
|
90
|
|
- assertIsChildById(uut.getView(), stackController.getView());
|
91
|
|
- assertIsChildById(stackController.getView(), child1.getView());
|
|
90
|
+ assertIsChild(uut.getView(), stackController.getView());
|
|
91
|
+ assertIsChild(stackController.getView(), child1.getView());
|
92
|
92
|
|
93
|
93
|
uut.push(child1.getId(), child2, new CommandListenerAdapter());
|
94
|
94
|
|
95
|
|
- assertIsChildById(uut.getView(), stackController.getView());
|
96
|
|
- assertIsChildById(stackController.getView(), child2.getView());
|
|
95
|
+ assertIsChild(uut.getView(), stackController.getView());
|
|
96
|
+ assertIsChild(stackController.getView(), child2.getView());
|
97
|
97
|
}
|
98
|
98
|
|
99
|
99
|
@Test
|
100
|
100
|
public void push_InvalidPushWithoutAStack_DoesNothing() {
|
101
|
101
|
uut.setRoot(child1, new MockPromise());
|
102
|
102
|
uut.push(child1.getId(), child2, new CommandListenerAdapter());
|
103
|
|
- assertIsChildById(uut.getView(), child1.getView());
|
|
103
|
+ assertIsChild(uut.getView(), child1.getView());
|
104
|
104
|
}
|
105
|
105
|
|
106
|
106
|
@Test
|
|
@@ -273,19 +273,19 @@ public class NavigatorTest extends BaseTest {
|
273
|
273
|
}
|
274
|
274
|
|
275
|
275
|
@Test
|
276
|
|
- public void push_Promise() {
|
|
276
|
+ public void push_promise() {
|
277
|
277
|
final StackController stackController = newStack();
|
278
|
278
|
stackController.push(child1, new CommandListenerAdapter());
|
279
|
279
|
uut.setRoot(stackController, new MockPromise());
|
280
|
280
|
|
281
|
|
- assertIsChildById(uut.getView(), stackController.getView());
|
282
|
|
- assertIsChildById(stackController.getView(), child1.getView());
|
|
281
|
+ assertIsChild(uut.getView(), stackController.getView());
|
|
282
|
+ assertIsChild(stackController.getView(), child1.getView());
|
283
|
283
|
|
284
|
284
|
uut.push(child1.getId(), child2, new CommandListenerAdapter() {
|
285
|
285
|
@Override
|
286
|
286
|
public void onSuccess(String childId) {
|
287
|
|
- assertIsChildById(uut.getView(), stackController.getView());
|
288
|
|
- assertIsChildById(stackController.getView(), child2.getView());
|
|
287
|
+ assertIsChild(uut.getView(), stackController.getView());
|
|
288
|
+ assertIsChild(stackController.getView(), child2.getView());
|
289
|
289
|
}
|
290
|
290
|
});
|
291
|
291
|
}
|
|
@@ -296,7 +296,7 @@ public class NavigatorTest extends BaseTest {
|
296
|
296
|
uut.push(child1.getId(), child2, new CommandListenerAdapter() {
|
297
|
297
|
@Override
|
298
|
298
|
public void onError(String message) {
|
299
|
|
- assertIsChildById(uut.getView(), child1.getView());
|
|
299
|
+ assertIsChild(uut.getView(), child1.getView());
|
300
|
300
|
}
|
301
|
301
|
});
|
302
|
302
|
|
|
@@ -341,7 +341,7 @@ public class NavigatorTest extends BaseTest {
|
341
|
341
|
stackController.push(child1, new CommandListenerAdapter());
|
342
|
342
|
uut.showModal(stackController, new MockPromise());
|
343
|
343
|
uut.push(stackController.getId(), child2, new CommandListenerAdapter());
|
344
|
|
- assertIsChildById(stackController.getView(), child2.getView());
|
|
344
|
+ assertIsChild(stackController.getView(), child2.getView());
|
345
|
345
|
}
|
346
|
346
|
|
347
|
347
|
@Test
|