Search in sources :

Example 1 with BackButtonHelper

use of com.reactnativenavigation.viewcontrollers.stack.topbar.button.BackButtonHelper in project react-native-navigation by wix.

the class BackButtonHelperTest method beforeEach.

@Override
public void beforeEach() {
    uut = new BackButtonHelper();
    Activity activity = newActivity();
    ChildControllersRegistry childRegistry = new ChildControllersRegistry();
    stack = TestUtils.newStackController(activity).setChildRegistry(childRegistry).setBackButtonHelper(uut).build();
    child1 = spy(new SimpleViewController(activity, childRegistry, "child1", new Options()));
    child2 = spy(new SimpleViewController(activity, childRegistry, "child2", new Options()));
    stack.ensureViewIsCreated();
}
Also used : Options(com.reactnativenavigation.options.Options) BackButtonHelper(com.reactnativenavigation.viewcontrollers.stack.topbar.button.BackButtonHelper) Activity(android.app.Activity) ChildControllersRegistry(com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry) SimpleViewController(com.reactnativenavigation.mocks.SimpleViewController)

Aggregations

Activity (android.app.Activity)1 SimpleViewController (com.reactnativenavigation.mocks.SimpleViewController)1 Options (com.reactnativenavigation.options.Options)1 ChildControllersRegistry (com.reactnativenavigation.viewcontrollers.child.ChildControllersRegistry)1 BackButtonHelper (com.reactnativenavigation.viewcontrollers.stack.topbar.button.BackButtonHelper)1