Преглед изворни кода

Cleanup OptionsApplyingTest

Guy Carmeli пре 6 година
родитељ
комит
742581c404

+ 1
- 12
lib/android/app/src/test/java/com/reactnativenavigation/viewcontrollers/OptionsApplyingTest.java Прегледај датотеку

1
 package com.reactnativenavigation.viewcontrollers;
1
 package com.reactnativenavigation.viewcontrollers;
2
 
2
 
3
 import android.app.Activity;
3
 import android.app.Activity;
4
-import android.content.Context;
5
 import android.graphics.Color;
4
 import android.graphics.Color;
6
 import android.graphics.drawable.ColorDrawable;
5
 import android.graphics.drawable.ColorDrawable;
7
 import android.view.View;
6
 import android.view.View;
24
 import com.reactnativenavigation.utils.ViewUtils;
23
 import com.reactnativenavigation.utils.ViewUtils;
25
 import com.reactnativenavigation.viewcontrollers.topbar.TopBarBackgroundViewController;
24
 import com.reactnativenavigation.viewcontrollers.topbar.TopBarBackgroundViewController;
26
 import com.reactnativenavigation.viewcontrollers.topbar.TopBarController;
25
 import com.reactnativenavigation.viewcontrollers.topbar.TopBarController;
27
-import com.reactnativenavigation.views.StackLayout;
28
-import com.reactnativenavigation.views.titlebar.TitleBarReactViewCreator;
29
-import com.reactnativenavigation.views.topbar.TopBar;
30
 import com.reactnativenavigation.views.topbar.TopBarBackgroundView;
26
 import com.reactnativenavigation.views.topbar.TopBarBackgroundView;
31
 
27
 
32
 import org.json.JSONObject;
28
 import org.json.JSONObject;
57
                 (activity1, componentId, componentName) -> view,
53
                 (activity1, componentId, componentName) -> view,
58
                 initialNavigationOptions
54
                 initialNavigationOptions
59
         );
55
         );
60
-        TopBarController topBarController = new TopBarController() {
61
-            @Override
62
-            protected TopBar createTopBar(Context context, ReactViewCreator buttonCreator, TitleBarReactViewCreator titleBarReactViewCreator, TopBarBackgroundViewController topBarBackgroundViewController, TopBarButtonController.OnClickListener topBarButtonClickListener, StackLayout stackLayout) {
63
-                TopBar topBar = super.createTopBar(context, buttonCreator, titleBarReactViewCreator, topBarBackgroundViewController, topBarButtonClickListener, stackLayout);
64
-                return topBar;
65
-            }
66
-        };
67
-        stackController = new StackController(activity, new TopBarButtonCreatorMock(), new TitleBarReactViewCreatorMock(), new TopBarBackgroundViewController(activity, new TopBarBackgroundViewCreatorMock()), topBarController, "stack", new Options());
56
+        stackController = new StackController(activity, new TopBarButtonCreatorMock(), new TitleBarReactViewCreatorMock(), new TopBarBackgroundViewController(activity, new TopBarBackgroundViewCreatorMock()), new TopBarController(), "stack", new Options());
68
         stackController.ensureViewIsCreated();
57
         stackController.ensureViewIsCreated();
69
         stackController.getView().layout(0, 0, 1000, 1000);
58
         stackController.getView().layout(0, 0, 1000, 1000);
70
         stackController.getTopBar().layout(0, 0, 1000, 100);
59
         stackController.getTopBar().layout(0, 0, 1000, 100);