Browse Source

Rename presenters

Guy Carmeli 6 years ago
parent
commit
07e51fc1ac
16 changed files with 55 additions and 55 deletions
  1. 6
    6
      lib/android/app/src/main/java/com/reactnativenavigation/parse/LayoutFactory.java
  2. 2
    2
      lib/android/app/src/main/java/com/reactnativenavigation/presentation/BottomTabPresenter.java
  3. 2
    2
      lib/android/app/src/main/java/com/reactnativenavigation/presentation/BottomTabsPresenter.java
  4. 2
    2
      lib/android/app/src/main/java/com/reactnativenavigation/presentation/StackPresenter.java
  5. 1
    1
      lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/TitleBarButtonController.java
  6. 5
    5
      lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java
  7. 3
    3
      lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java
  8. 3
    3
      lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerBuilder.java
  9. 2
    2
      lib/android/app/src/test/java/com/reactnativenavigation/TestUtils.java
  10. 4
    4
      lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/BottomTabPresenterTest.java
  11. 6
    6
      lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/BottomTabsControllerTest.java
  12. 4
    4
      lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/BottomTabsPresenterTest.java
  13. 2
    2
      lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/OptionsApplyingTest.java
  14. 4
    4
      lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/StackPresenterTest.java
  15. 3
    3
      lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/NavigatorTest.java
  16. 6
    6
      lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerTest.java

+ 6
- 6
lib/android/app/src/main/java/com/reactnativenavigation/parse/LayoutFactory.java View File

@@ -3,11 +3,11 @@ package com.reactnativenavigation.parse;
3 3
 import android.app.Activity;
4 4
 
5 5
 import com.facebook.react.ReactInstanceManager;
6
-import com.reactnativenavigation.presentation.BottomTabOptionsPresenter;
7
-import com.reactnativenavigation.presentation.BottomTabsOptionsPresenter;
6
+import com.reactnativenavigation.presentation.BottomTabPresenter;
7
+import com.reactnativenavigation.presentation.BottomTabsPresenter;
8 8
 import com.reactnativenavigation.presentation.OptionsPresenter;
9 9
 import com.reactnativenavigation.presentation.SideMenuOptionsPresenter;
10
-import com.reactnativenavigation.presentation.StackOptionsPresenter;
10
+import com.reactnativenavigation.presentation.StackPresenter;
11 11
 import com.reactnativenavigation.react.EventEmitter;
12 12
 import com.reactnativenavigation.utils.ImageLoader;
13 13
 import com.reactnativenavigation.utils.TypefaceLoader;
@@ -168,7 +168,7 @@ public class LayoutFactory {
168 168
                 .setTopBarController(new TopBarController())
169 169
                 .setId(node.id)
170 170
                 .setInitialOptions(parse(typefaceManager, node.getOptions()))
171
-                .setStackPresenter(new StackOptionsPresenter(activity, new TitleBarReactViewCreator(reactInstanceManager), new TitleBarButtonCreator(reactInstanceManager), new ImageLoader(), defaultOptions))
171
+                .setStackPresenter(new StackPresenter(activity, new TitleBarReactViewCreator(reactInstanceManager), new TitleBarButtonCreator(reactInstanceManager), new ImageLoader(), defaultOptions))
172 172
                 .setPresenter(new OptionsPresenter(activity, defaultOptions))
173 173
                 .build();
174 174
 	}
@@ -194,8 +194,8 @@ public class LayoutFactory {
194 194
                 node.id,
195 195
                 parse(typefaceManager, node.getOptions()),
196 196
                 new OptionsPresenter(activity, defaultOptions),
197
-                new BottomTabsOptionsPresenter(tabs, defaultOptions),
198
-                new BottomTabOptionsPresenter(activity, tabs, defaultOptions));
197
+                new BottomTabsPresenter(tabs, defaultOptions),
198
+                new BottomTabPresenter(activity, tabs, defaultOptions));
199 199
 	}
200 200
 
201 201
     private ViewController createTopTabs(LayoutNode node) {

lib/android/app/src/main/java/com/reactnativenavigation/presentation/BottomTabOptionsPresenter.java → lib/android/app/src/main/java/com/reactnativenavigation/presentation/BottomTabPresenter.java View File

@@ -13,7 +13,7 @@ import com.reactnativenavigation.views.Component;
13 13
 
14 14
 import java.util.List;
15 15
 
16
-public class BottomTabOptionsPresenter {
16
+public class BottomTabPresenter {
17 17
     private Options defaultOptions;
18 18
     private final BottomTabFinder bottomTabFinder;
19 19
     private BottomTabs bottomTabs;
@@ -21,7 +21,7 @@ public class BottomTabOptionsPresenter {
21 21
     private final int defaultTextColor;
22 22
     private final List<ViewController> tabs;
23 23
 
24
-    public BottomTabOptionsPresenter(Context context, List<ViewController> tabs, Options defaultOptions) {
24
+    public BottomTabPresenter(Context context, List<ViewController> tabs, Options defaultOptions) {
25 25
         this.tabs = tabs;
26 26
         this.bottomTabFinder = new BottomTabFinder(tabs);
27 27
         this.defaultOptions = defaultOptions;

lib/android/app/src/main/java/com/reactnativenavigation/presentation/BottomTabsOptionsPresenter.java → lib/android/app/src/main/java/com/reactnativenavigation/presentation/BottomTabsPresenter.java View File

@@ -19,7 +19,7 @@ import com.reactnativenavigation.views.Component;
19 19
 
20 20
 import java.util.List;
21 21
 
22
-public class BottomTabsOptionsPresenter {
22
+public class BottomTabsPresenter {
23 23
     private final BottomTabFinder bottomTabFinder;
24 24
     private final List<ViewController> tabs;
25 25
     private Options defaultOptions;
@@ -27,7 +27,7 @@ public class BottomTabsOptionsPresenter {
27 27
     private BottomTabsAnimator animator;
28 28
     private TabSelector tabSelector;
29 29
 
30
-    public BottomTabsOptionsPresenter(List<ViewController> tabs, Options defaultOptions) {
30
+    public BottomTabsPresenter(List<ViewController> tabs, Options defaultOptions) {
31 31
         this.tabs = tabs;
32 32
         this.defaultOptions = defaultOptions;
33 33
         this.bottomTabFinder = new BottomTabFinder(tabs);

lib/android/app/src/main/java/com/reactnativenavigation/presentation/StackOptionsPresenter.java → lib/android/app/src/main/java/com/reactnativenavigation/presentation/StackPresenter.java View File

@@ -43,7 +43,7 @@ import static com.reactnativenavigation.utils.CollectionUtils.forEach;
43 43
 import static com.reactnativenavigation.utils.CollectionUtils.keyBy;
44 44
 import static com.reactnativenavigation.utils.CollectionUtils.merge;
45 45
 
46
-public class StackOptionsPresenter {
46
+public class StackPresenter {
47 47
     private static final int DEFAULT_TITLE_COLOR = Color.BLACK;
48 48
     private static final int DEFAULT_SUBTITLE_COLOR = Color.GRAY;
49 49
     private static final int DEFAULT_BORDER_COLOR = Color.BLACK;
@@ -62,7 +62,7 @@ public class StackOptionsPresenter {
62 62
     private Map<Component, Map<String, TitleBarButtonController>> componentRightButtons = new HashMap<>();
63 63
     private Map<Component, Map<String, TitleBarButtonController>> componentLeftButtons = new HashMap<>();
64 64
 
65
-    public StackOptionsPresenter(Activity activity, TitleBarReactViewCreator titleViewCreator, ReactViewCreator buttonCreator, ImageLoader imageLoader, Options defaultOptions) {
65
+    public StackPresenter(Activity activity, TitleBarReactViewCreator titleViewCreator, ReactViewCreator buttonCreator, ImageLoader imageLoader, Options defaultOptions) {
66 66
         this.activity = activity;
67 67
         this.titleViewCreator = titleViewCreator;
68 68
         this.buttonCreator = buttonCreator;

+ 1
- 1
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/TitleBarButtonController.java View File

@@ -1,4 +1,4 @@
1
-package com.reactnativenavigation.viewcontrollers;
1
+    package com.reactnativenavigation.viewcontrollers;
2 2
 
3 3
 import android.annotation.SuppressLint;
4 4
 import android.app.Activity;

+ 5
- 5
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/bottomtabs/BottomTabsController.java View File

@@ -12,8 +12,8 @@ import com.aurelhubert.ahbottomnavigation.AHBottomNavigation;
12 12
 import com.aurelhubert.ahbottomnavigation.AHBottomNavigationItem;
13 13
 import com.reactnativenavigation.parse.BottomTabOptions;
14 14
 import com.reactnativenavigation.parse.Options;
15
-import com.reactnativenavigation.presentation.BottomTabOptionsPresenter;
16
-import com.reactnativenavigation.presentation.BottomTabsOptionsPresenter;
15
+import com.reactnativenavigation.presentation.BottomTabPresenter;
16
+import com.reactnativenavigation.presentation.BottomTabsPresenter;
17 17
 import com.reactnativenavigation.presentation.OptionsPresenter;
18 18
 import com.reactnativenavigation.react.EventEmitter;
19 19
 import com.reactnativenavigation.utils.CommandListener;
@@ -39,10 +39,10 @@ public class BottomTabsController extends ParentController implements AHBottomNa
39 39
 	private List<ViewController> tabs;
40 40
     private EventEmitter eventEmitter;
41 41
     private ImageLoader imageLoader;
42
-    private BottomTabsOptionsPresenter presenter;
43
-    private BottomTabOptionsPresenter tabPresenter;
42
+    private BottomTabsPresenter presenter;
43
+    private BottomTabPresenter tabPresenter;
44 44
 
45
-    public BottomTabsController(Activity activity, List<ViewController> tabs, ChildControllersRegistry childRegistry, EventEmitter eventEmitter, ImageLoader imageLoader, String id, Options initialOptions, OptionsPresenter presenter, BottomTabsOptionsPresenter bottomTabsPresenter, BottomTabOptionsPresenter bottomTabPresenter) {
45
+    public BottomTabsController(Activity activity, List<ViewController> tabs, ChildControllersRegistry childRegistry, EventEmitter eventEmitter, ImageLoader imageLoader, String id, Options initialOptions, OptionsPresenter presenter, BottomTabsPresenter bottomTabsPresenter, BottomTabPresenter bottomTabPresenter) {
46 46
 		super(activity, childRegistry, id, presenter, initialOptions);
47 47
         this.tabs = tabs;
48 48
         this.eventEmitter = eventEmitter;

+ 3
- 3
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackController.java View File

@@ -12,7 +12,7 @@ import android.widget.RelativeLayout;
12 12
 import com.reactnativenavigation.anim.NavigationAnimator;
13 13
 import com.reactnativenavigation.parse.Options;
14 14
 import com.reactnativenavigation.presentation.OptionsPresenter;
15
-import com.reactnativenavigation.presentation.StackOptionsPresenter;
15
+import com.reactnativenavigation.presentation.StackPresenter;
16 16
 import com.reactnativenavigation.react.Constants;
17 17
 import com.reactnativenavigation.utils.CommandListener;
18 18
 import com.reactnativenavigation.utils.CommandListenerAdapter;
@@ -40,9 +40,9 @@ public class StackController extends ParentController<StackLayout> {
40 40
     private TopBarBackgroundViewController topBarBackgroundViewController;
41 41
     private TopBarController topBarController;
42 42
     private BackButtonHelper backButtonHelper;
43
-    private final StackOptionsPresenter presenter;
43
+    private final StackPresenter presenter;
44 44
 
45
-    public StackController(Activity activity, List<ViewController> children, ChildControllersRegistry childRegistry, TopBarBackgroundViewController topBarBackgroundViewController, TopBarController topBarController, NavigationAnimator animator, String id, Options initialOptions, BackButtonHelper backButtonHelper, StackOptionsPresenter stackPresenter, OptionsPresenter presenter) {
45
+    public StackController(Activity activity, List<ViewController> children, ChildControllersRegistry childRegistry, TopBarBackgroundViewController topBarBackgroundViewController, TopBarController topBarController, NavigationAnimator animator, String id, Options initialOptions, BackButtonHelper backButtonHelper, StackPresenter stackPresenter, OptionsPresenter presenter) {
46 46
         super(activity, childRegistry, id, presenter, initialOptions);
47 47
         this.topBarController = topBarController;
48 48
         this.topBarBackgroundViewController = topBarBackgroundViewController;

+ 3
- 3
lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerBuilder.java View File

@@ -5,7 +5,7 @@ import android.app.Activity;
5 5
 import com.reactnativenavigation.anim.NavigationAnimator;
6 6
 import com.reactnativenavigation.parse.Options;
7 7
 import com.reactnativenavigation.presentation.OptionsPresenter;
8
-import com.reactnativenavigation.presentation.StackOptionsPresenter;
8
+import com.reactnativenavigation.presentation.StackPresenter;
9 9
 import com.reactnativenavigation.viewcontrollers.ChildControllersRegistry;
10 10
 import com.reactnativenavigation.viewcontrollers.ReactViewCreator;
11 11
 import com.reactnativenavigation.viewcontrollers.ViewController;
@@ -27,7 +27,7 @@ public class StackControllerBuilder {
27 27
     private NavigationAnimator animator;
28 28
     private BackButtonHelper backButtonHelper = new BackButtonHelper();
29 29
     private OptionsPresenter presenter;
30
-    private StackOptionsPresenter stackPresenter;
30
+    private StackPresenter stackPresenter;
31 31
     private List<ViewController> children = new ArrayList<>();
32 32
 
33 33
     public StackControllerBuilder(Activity activity) {
@@ -41,7 +41,7 @@ public class StackControllerBuilder {
41 41
         return this;
42 42
     }
43 43
 
44
-    public StackControllerBuilder setStackPresenter(StackOptionsPresenter stackPresenter) {
44
+    public StackControllerBuilder setStackPresenter(StackPresenter stackPresenter) {
45 45
         this.stackPresenter = stackPresenter;
46 46
         return this;
47 47
     }

+ 2
- 2
lib/android/app/src/test/java/com/reactnativenavigation/TestUtils.java View File

@@ -8,7 +8,7 @@ import com.reactnativenavigation.mocks.TopBarBackgroundViewCreatorMock;
8 8
 import com.reactnativenavigation.mocks.TopBarButtonCreatorMock;
9 9
 import com.reactnativenavigation.parse.Options;
10 10
 import com.reactnativenavigation.parse.params.Bool;
11
-import com.reactnativenavigation.presentation.StackOptionsPresenter;
11
+import com.reactnativenavigation.presentation.StackPresenter;
12 12
 import com.reactnativenavigation.utils.ImageLoader;
13 13
 import com.reactnativenavigation.utils.UiUtils;
14 14
 import com.reactnativenavigation.viewcontrollers.ChildControllersRegistry;
@@ -34,7 +34,7 @@ public class TestUtils {
34 34
                         return topBar;
35 35
                     }
36 36
                 })
37
-                .setStackPresenter(new StackOptionsPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options())                )
37
+                .setStackPresenter(new StackPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options())                )
38 38
                 .setInitialOptions(new Options());
39 39
     }
40 40
 

lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/BottomTabOptionsPresenterTest.java → lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/BottomTabPresenterTest.java View File

@@ -8,7 +8,7 @@ import com.reactnativenavigation.mocks.SimpleViewController;
8 8
 import com.reactnativenavigation.parse.Options;
9 9
 import com.reactnativenavigation.parse.params.Colour;
10 10
 import com.reactnativenavigation.parse.params.Text;
11
-import com.reactnativenavigation.presentation.BottomTabOptionsPresenter;
11
+import com.reactnativenavigation.presentation.BottomTabPresenter;
12 12
 import com.reactnativenavigation.views.BottomTabs;
13 13
 import com.reactnativenavigation.views.Component;
14 14
 
@@ -26,10 +26,10 @@ import static org.mockito.Mockito.times;
26 26
 import static org.mockito.Mockito.verify;
27 27
 import static org.mockito.Mockito.verifyNoMoreInteractions;
28 28
 
29
-public class BottomTabOptionsPresenterTest extends BaseTest {
29
+public class BottomTabPresenterTest extends BaseTest {
30 30
     private Options tab1Options = createTab1Options();
31 31
     private Options tab2Options = createTab2Options();
32
-    private BottomTabOptionsPresenter uut;
32
+    private BottomTabPresenter uut;
33 33
     private BottomTabs bottomTabs;
34 34
     private List<ViewController> tabs;
35 35
     private ViewController child3;
@@ -43,7 +43,7 @@ public class BottomTabOptionsPresenterTest extends BaseTest {
43 43
         ViewController child2 = spy(new SimpleViewController(activity, childRegistry, "child2", tab2Options));
44 44
         child3 = spy(new SimpleViewController(activity, childRegistry, "child2", new Options()));
45 45
         tabs = Arrays.asList(child1, child2, child3);
46
-        uut = new BottomTabOptionsPresenter(activity, tabs, new Options());
46
+        uut = new BottomTabPresenter(activity, tabs, new Options());
47 47
         uut.bindView(bottomTabs);
48 48
         uut.setDefaultOptions(new Options());
49 49
     }

+ 6
- 6
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/BottomTabsControllerTest.java View File

@@ -16,8 +16,8 @@ import com.reactnativenavigation.parse.params.Bool;
16 16
 import com.reactnativenavigation.parse.params.Colour;
17 17
 import com.reactnativenavigation.parse.params.Number;
18 18
 import com.reactnativenavigation.parse.params.Text;
19
-import com.reactnativenavigation.presentation.BottomTabOptionsPresenter;
20
-import com.reactnativenavigation.presentation.BottomTabsOptionsPresenter;
19
+import com.reactnativenavigation.presentation.BottomTabPresenter;
20
+import com.reactnativenavigation.presentation.BottomTabsPresenter;
21 21
 import com.reactnativenavigation.presentation.OptionsPresenter;
22 22
 import com.reactnativenavigation.react.EventEmitter;
23 23
 import com.reactnativenavigation.utils.CommandListenerAdapter;
@@ -64,7 +64,7 @@ public class BottomTabsControllerTest extends BaseTest {
64 64
     private EventEmitter eventEmitter;
65 65
     private ChildControllersRegistry childRegistry;
66 66
     private List<ViewController> tabs;
67
-    private BottomTabsOptionsPresenter presenter;
67
+    private BottomTabsPresenter presenter;
68 68
 
69 69
     @Override
70 70
     public void beforeEach() {
@@ -80,7 +80,7 @@ public class BottomTabsControllerTest extends BaseTest {
80 80
         child6 = spy(new SimpleViewController(activity, childRegistry, "child6", tabOptions));
81 81
         when(child5.handleBack(any())).thenReturn(true);
82 82
         tabs = createTabs();
83
-        presenter = spy(new BottomTabsOptionsPresenter(tabs, new Options()));
83
+        presenter = spy(new BottomTabsPresenter(tabs, new Options()));
84 84
         uut = createBottomTabs();
85 85
         activity.setContentView(uut.getView());
86 86
     }
@@ -231,7 +231,7 @@ public class BottomTabsControllerTest extends BaseTest {
231 231
                 initialOptions,
232 232
                 new OptionsPresenter(activity, new Options()),
233 233
                 presenter,
234
-                new BottomTabOptionsPresenter(activity, tabs, new Options())) {
234
+                new BottomTabPresenter(activity, tabs, new Options())) {
235 235
             @Override
236 236
             public Options resolveCurrentOptions() {
237 237
                 return resolvedOptions;
@@ -340,7 +340,7 @@ public class BottomTabsControllerTest extends BaseTest {
340 340
                 initialOptions,
341 341
                 new OptionsPresenter(activity, new Options()),
342 342
                 presenter,
343
-                new BottomTabOptionsPresenter(activity, tabs, new Options())) {
343
+                new BottomTabPresenter(activity, tabs, new Options())) {
344 344
             @Override
345 345
             public void ensureViewIsCreated() {
346 346
                 super.ensureViewIsCreated();

lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/BottomTabsOptionsPresenterTest.java → lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/BottomTabsPresenterTest.java View File

@@ -7,7 +7,7 @@ import com.reactnativenavigation.mocks.SimpleViewController;
7 7
 import com.reactnativenavigation.parse.Options;
8 8
 import com.reactnativenavigation.parse.params.Bool;
9 9
 import com.reactnativenavigation.parse.params.Colour;
10
-import com.reactnativenavigation.presentation.BottomTabsOptionsPresenter;
10
+import com.reactnativenavigation.presentation.BottomTabsPresenter;
11 11
 import com.reactnativenavigation.viewcontrollers.bottomtabs.TabSelector;
12 12
 import com.reactnativenavigation.views.BottomTabs;
13 13
 import com.reactnativenavigation.views.Component;
@@ -22,9 +22,9 @@ import static org.mockito.Mockito.spy;
22 22
 import static org.mockito.Mockito.verify;
23 23
 import static org.mockito.Mockito.verifyNoMoreInteractions;
24 24
 
25
-public class BottomTabsOptionsPresenterTest extends BaseTest {
25
+public class BottomTabsPresenterTest extends BaseTest {
26 26
     private List<ViewController> tabs;
27
-    private BottomTabsOptionsPresenter uut;
27
+    private BottomTabsPresenter uut;
28 28
     private BottomTabs bottomTabs;
29 29
 
30 30
     @Override
@@ -34,7 +34,7 @@ public class BottomTabsOptionsPresenterTest extends BaseTest {
34 34
         ViewController child1 = spy(new SimpleViewController(activity, childRegistry, "child1", new Options()));
35 35
         ViewController child2 = spy(new SimpleViewController(activity, childRegistry, "child2", new Options()));
36 36
         tabs = Arrays.asList(child1, child2);
37
-        uut = new BottomTabsOptionsPresenter(tabs, new Options());
37
+        uut = new BottomTabsPresenter(tabs, new Options());
38 38
         bottomTabs = Mockito.mock(BottomTabs.class);
39 39
         uut.bindView(bottomTabs, Mockito.mock(TabSelector.class));
40 40
     }

+ 2
- 2
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/OptionsApplyingTest.java View File

@@ -23,7 +23,7 @@ import com.reactnativenavigation.parse.params.Colour;
23 23
 import com.reactnativenavigation.parse.params.Fraction;
24 24
 import com.reactnativenavigation.parse.params.Text;
25 25
 import com.reactnativenavigation.presentation.OptionsPresenter;
26
-import com.reactnativenavigation.presentation.StackOptionsPresenter;
26
+import com.reactnativenavigation.presentation.StackPresenter;
27 27
 import com.reactnativenavigation.utils.CommandListenerAdapter;
28 28
 import com.reactnativenavigation.utils.ImageLoader;
29 29
 import com.reactnativenavigation.viewcontrollers.stack.StackController;
@@ -108,7 +108,7 @@ public class OptionsApplyingTest extends BaseTest {
108 108
                         .setTopBarController(new TopBarController())
109 109
                         .setId("stackId")
110 110
                         .setInitialOptions(new Options())
111
-                        .setStackPresenter(new StackOptionsPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options()))
111
+                        .setStackPresenter(new StackPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options()))
112 112
                         .build();
113 113
         stackController.ensureViewIsCreated();
114 114
         stackController.push(uut, new CommandListenerAdapter());

lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/StackOptionsPresenterTest.java → lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/StackPresenterTest.java View File

@@ -26,7 +26,7 @@ import com.reactnativenavigation.parse.params.Colour;
26 26
 import com.reactnativenavigation.parse.params.Fraction;
27 27
 import com.reactnativenavigation.parse.params.Number;
28 28
 import com.reactnativenavigation.parse.params.Text;
29
-import com.reactnativenavigation.presentation.StackOptionsPresenter;
29
+import com.reactnativenavigation.presentation.StackPresenter;
30 30
 import com.reactnativenavigation.utils.TitleBarHelper;
31 31
 import com.reactnativenavigation.views.titlebar.TitleBarReactView;
32 32
 import com.reactnativenavigation.views.topbar.TopBar;
@@ -51,10 +51,10 @@ import static org.mockito.Mockito.times;
51 51
 import static org.mockito.Mockito.verify;
52 52
 import static org.mockito.Mockito.when;
53 53
 
54
-public class StackOptionsPresenterTest extends BaseTest {
54
+public class StackPresenterTest extends BaseTest {
55 55
 
56 56
     private static final Options EMPTY_OPTIONS = new Options();
57
-    private StackOptionsPresenter uut;
57
+    private StackPresenter uut;
58 58
     private TestComponentLayout child;
59 59
     private TestComponentLayout otherChild;
60 60
     private Activity activity;
@@ -82,7 +82,7 @@ public class StackOptionsPresenterTest extends BaseTest {
82 82
                 return spy(super.create(activity, componentId, componentName));
83 83
             }
84 84
         };
85
-        uut = spy(new StackOptionsPresenter(activity, titleViewCreator, new TopBarButtonCreatorMock(), ImageLoaderMock.mock(), new Options()));
85
+        uut = spy(new StackPresenter(activity, titleViewCreator, new TopBarButtonCreatorMock(), ImageLoaderMock.mock(), new Options()));
86 86
         topBar = mockTopBar();
87 87
         uut.bindView(topBar);
88 88
         uut.setButtonOnClickListener(onClickListener);

+ 3
- 3
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/navigator/NavigatorTest.java View File

@@ -14,8 +14,8 @@ import com.reactnativenavigation.mocks.SimpleViewController;
14 14
 import com.reactnativenavigation.parse.Options;
15 15
 import com.reactnativenavigation.parse.params.Bool;
16 16
 import com.reactnativenavigation.parse.params.Text;
17
-import com.reactnativenavigation.presentation.BottomTabOptionsPresenter;
18
-import com.reactnativenavigation.presentation.BottomTabsOptionsPresenter;
17
+import com.reactnativenavigation.presentation.BottomTabPresenter;
18
+import com.reactnativenavigation.presentation.BottomTabsPresenter;
19 19
 import com.reactnativenavigation.presentation.OptionsPresenter;
20 20
 import com.reactnativenavigation.presentation.OverlayManager;
21 21
 import com.reactnativenavigation.react.EventEmitter;
@@ -346,7 +346,7 @@ public class NavigatorTest extends BaseTest {
346 346
 
347 347
     @NonNull
348 348
     private BottomTabsController newTabs(List<ViewController> tabs) {
349
-        return new BottomTabsController(activity, tabs, childRegistry, eventEmitter, imageLoaderMock, "tabsController", new Options(), new OptionsPresenter(activity, new Options()), new BottomTabsOptionsPresenter(tabs, new Options()), new BottomTabOptionsPresenter(activity, tabs, new Options()));
349
+        return new BottomTabsController(activity, tabs, childRegistry, eventEmitter, imageLoaderMock, "tabsController", new Options(), new OptionsPresenter(activity, new Options()), new BottomTabsPresenter(tabs, new Options()), new BottomTabPresenter(activity, tabs, new Options()));
350 350
     }
351 351
 
352 352
     @NonNull

+ 6
- 6
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/stack/StackControllerTest.java View File

@@ -17,7 +17,7 @@ import com.reactnativenavigation.parse.NestedAnimationsOptions;
17 17
 import com.reactnativenavigation.parse.Options;
18 18
 import com.reactnativenavigation.parse.params.Bool;
19 19
 import com.reactnativenavigation.parse.params.Text;
20
-import com.reactnativenavigation.presentation.StackOptionsPresenter;
20
+import com.reactnativenavigation.presentation.StackPresenter;
21 21
 import com.reactnativenavigation.utils.CommandListenerAdapter;
22 22
 import com.reactnativenavigation.utils.ImageLoader;
23 23
 import com.reactnativenavigation.utils.TitleBarHelper;
@@ -68,7 +68,7 @@ public class StackControllerTest extends BaseTest {
68 68
     private ViewController child4;
69 69
     private NavigationAnimator animator;
70 70
     private TopBarController topBarController;
71
-    private StackOptionsPresenter presenter;
71
+    private StackPresenter presenter;
72 72
     private BackButtonHelper backButtonHelper;
73 73
 
74 74
     @Override
@@ -78,7 +78,7 @@ public class StackControllerTest extends BaseTest {
78 78
         activity = newActivity();
79 79
         animator = spy(new NavigationAnimator(activity, Mockito.mock(ElementTransitionManager.class)));
80 80
         childRegistry = new ChildControllersRegistry();
81
-        presenter = spy(new StackOptionsPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), ImageLoaderMock.mock(), new Options()));
81
+        presenter = spy(new StackPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), ImageLoaderMock.mock(), new Options()));
82 82
         child1 = spy(new SimpleViewController(activity, childRegistry, "child1", new Options()));
83 83
         child2 = spy(new SimpleViewController(activity, childRegistry, "child2", new Options()));
84 84
         child3 = spy(new SimpleViewController(activity, childRegistry, "child3", new Options()));
@@ -260,7 +260,7 @@ public class StackControllerTest extends BaseTest {
260 260
                         .setTopBarController(new TopBarController())
261 261
                         .setId("uut")
262 262
                         .setInitialOptions(new Options())
263
-                        .setStackPresenter(new StackOptionsPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options()))
263
+                        .setStackPresenter(new StackPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options()))
264 264
                         .build();
265 265
         uut.ensureViewIsCreated();
266 266
         uut.push(child1, new CommandListenerAdapter());
@@ -774,7 +774,7 @@ public class StackControllerTest extends BaseTest {
774 774
                         .setTopBarController(new TopBarController())
775 775
                         .setId("stack")
776 776
                         .setInitialOptions(new Options())
777
-                        .setStackPresenter(new StackOptionsPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options()))
777
+                        .setStackPresenter(new StackPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options()))
778 778
                         .build());
779 779
         Options optionsToMerge = new Options();
780 780
         Component component = mock(Component.class);
@@ -791,7 +791,7 @@ public class StackControllerTest extends BaseTest {
791 791
                         .setTopBarController(new TopBarController())
792 792
                         .setId("stack")
793 793
                         .setInitialOptions(new Options())
794
-                        .setStackPresenter(new StackOptionsPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options()))
794
+                        .setStackPresenter(new StackPresenter(activity, new TitleBarReactViewCreatorMock(), new TopBarButtonCreatorMock(), new ImageLoader(), new Options()))
795 795
                         .build();
796 796
         ParentController parentController = Mockito.mock(ParentController.class);
797 797
         uut.setParentController(parentController);