|
@@ -44,7 +44,7 @@ public class OptionsApplyingTest extends BaseTest {
|
44
|
44
|
|
45
|
45
|
@Test
|
46
|
46
|
public void initialOptionsAppliedOnAppear() throws Exception {
|
47
|
|
- assertThat(uut.getNavigationOptions()).isSameAs(initialNavigationOptions);
|
|
47
|
+ assertThat(uut.getOptions()).isSameAs(initialNavigationOptions);
|
48
|
48
|
initialNavigationOptions.topBarOptions.title = "the title";
|
49
|
49
|
StackController stackController = new StackController(activity, "stackId");
|
50
|
50
|
stackController.push(uut);
|
|
@@ -56,12 +56,12 @@ public class OptionsApplyingTest extends BaseTest {
|
56
|
56
|
|
57
|
57
|
@Test
|
58
|
58
|
public void mergeNavigationOptionsUpdatesCurrentOptions() throws Exception {
|
59
|
|
- assertThat(uut.getNavigationOptions().topBarOptions.title).isEmpty();
|
|
59
|
+ assertThat(uut.getOptions().topBarOptions.title).isEmpty();
|
60
|
60
|
NavigationOptions options = new NavigationOptions();
|
61
|
61
|
options.topBarOptions.title = "new title";
|
62
|
62
|
uut.mergeNavigationOptions(options);
|
63
|
|
- assertThat(uut.getNavigationOptions().topBarOptions.title).isEqualTo("new title");
|
64
|
|
- assertThat(uut.getNavigationOptions()).isSameAs(initialNavigationOptions);
|
|
63
|
+ assertThat(uut.getOptions().topBarOptions.title).isEqualTo("new title");
|
|
64
|
+ assertThat(uut.getOptions()).isSameAs(initialNavigationOptions);
|
65
|
65
|
}
|
66
|
66
|
|
67
|
67
|
@Test
|
|
@@ -91,7 +91,7 @@ public class OptionsApplyingTest extends BaseTest {
|
91
|
91
|
|
92
|
92
|
@Test
|
93
|
93
|
public void appliesTopBarTextColor() throws Exception {
|
94
|
|
- assertThat(uut.getNavigationOptions()).isSameAs(initialNavigationOptions);
|
|
94
|
+ assertThat(uut.getOptions()).isSameAs(initialNavigationOptions);
|
95
|
95
|
initialNavigationOptions.topBarOptions.title = "the title";
|
96
|
96
|
uut.onViewAppeared();
|
97
|
97
|
assertThat(uut.getTopBar().getTitleTextView().getCurrentTextColor()).isNotEqualTo(Color.RED);
|
|
@@ -107,7 +107,7 @@ public class OptionsApplyingTest extends BaseTest {
|
107
|
107
|
|
108
|
108
|
@Test
|
109
|
109
|
public void appliesTopBarTextSize() throws Exception {
|
110
|
|
- assertThat(uut.getNavigationOptions()).isSameAs(initialNavigationOptions);
|
|
110
|
+ assertThat(uut.getOptions()).isSameAs(initialNavigationOptions);
|
111
|
111
|
initialNavigationOptions.topBarOptions.title = "the title";
|
112
|
112
|
uut.onViewAppeared();
|
113
|
113
|
assertThat(uut.getTopBar().getTitleTextView().getTextSize()).isNotEqualTo(18);
|
|
@@ -123,7 +123,7 @@ public class OptionsApplyingTest extends BaseTest {
|
123
|
123
|
|
124
|
124
|
@Test
|
125
|
125
|
public void appliesTopBarHidden() throws Exception {
|
126
|
|
- assertThat(uut.getNavigationOptions()).isSameAs(initialNavigationOptions);
|
|
126
|
+ assertThat(uut.getOptions()).isSameAs(initialNavigationOptions);
|
127
|
127
|
initialNavigationOptions.topBarOptions.title = "the title";
|
128
|
128
|
uut.onViewAppeared();
|
129
|
129
|
assertThat(uut.getTopBar().getVisibility()).isNotEqualTo(View.GONE);
|