|
@@ -1,11 +1,11 @@
|
1
|
1
|
package com.reactnativenavigation.viewcontrollers.modal;
|
2
|
2
|
|
3
|
3
|
import android.app.Activity;
|
4
|
|
-import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
5
|
4
|
import android.view.ViewGroup;
|
6
|
5
|
import android.widget.FrameLayout;
|
7
|
6
|
|
8
|
|
-import com.reactnativenavigation.*;
|
|
7
|
+import com.reactnativenavigation.BaseTest;
|
|
8
|
+import com.reactnativenavigation.TestUtils;
|
9
|
9
|
import com.reactnativenavigation.anim.ModalAnimator;
|
10
|
10
|
import com.reactnativenavigation.mocks.SimpleViewController;
|
11
|
11
|
import com.reactnativenavigation.parse.Options;
|
|
@@ -14,13 +14,15 @@ import com.reactnativenavigation.utils.CommandListener;
|
14
|
14
|
import com.reactnativenavigation.utils.CommandListenerAdapter;
|
15
|
15
|
import com.reactnativenavigation.viewcontrollers.ChildControllersRegistry;
|
16
|
16
|
import com.reactnativenavigation.viewcontrollers.ViewController;
|
17
|
|
-import com.reactnativenavigation.viewcontrollers.stack.*;
|
|
17
|
+import com.reactnativenavigation.viewcontrollers.stack.StackController;
|
18
|
18
|
|
19
|
19
|
import org.junit.Test;
|
20
|
20
|
import org.mockito.Mockito;
|
21
|
21
|
|
22
|
22
|
import java.util.EmptyStackException;
|
23
|
23
|
|
|
24
|
+import androidx.coordinatorlayout.widget.CoordinatorLayout;
|
|
25
|
+
|
24
|
26
|
import static org.assertj.core.api.Java6Assertions.assertThat;
|
25
|
27
|
import static org.assertj.core.api.Java6Assertions.assertThatThrownBy;
|
26
|
28
|
import static org.mockito.ArgumentMatchers.any;
|
|
@@ -171,13 +173,6 @@ public class ModalStackTest extends BaseTest {
|
171
|
173
|
verifyZeroInteractions(listener);
|
172
|
174
|
}
|
173
|
175
|
|
174
|
|
- @Test
|
175
|
|
- public void dismissAllModals_rejectIfEmpty() {
|
176
|
|
- CommandListener spy = spy(new CommandListenerAdapter());
|
177
|
|
- uut.dismissAllModals(root, Options.EMPTY, spy);
|
178
|
|
- verify(spy, times(1)).onError(any());
|
179
|
|
- }
|
180
|
|
-
|
181
|
176
|
@Test
|
182
|
177
|
public void dismissAllModals_optionsAreMergedOnTopModal() {
|
183
|
178
|
uut.showModal(modal1, root, new CommandListenerAdapter());
|