|
@@ -244,6 +244,18 @@ public class StackControllerTest extends BaseTest {
|
244
|
244
|
inOrder.verify(backListener).onSuccess(any());
|
245
|
245
|
}
|
246
|
246
|
|
|
247
|
+ @Test
|
|
248
|
+ public void push_rejectIfStackContainsChildWithId() {
|
|
249
|
+ disablePushAnimation(child1);
|
|
250
|
+ uut.push(child1, new CommandListenerAdapter());
|
|
251
|
+ assertThat(uut.size()).isEqualTo(1);
|
|
252
|
+
|
|
253
|
+ CommandListenerAdapter listener = spy(new CommandListenerAdapter());
|
|
254
|
+ uut.push(child1a, listener);
|
|
255
|
+ verify(listener).onError(any());
|
|
256
|
+ assertThat(uut.size()).isEqualTo(1);
|
|
257
|
+ }
|
|
258
|
+
|
247
|
259
|
@Test
|
248
|
260
|
public void animateSetRoot() {
|
249
|
261
|
disablePushAnimation(child1, child2, child3);
|