|
@@ -21,9 +21,9 @@
|
21
|
21
|
self.options = [[RNNNavigationOptions alloc] initEmptyOptions];
|
22
|
22
|
}
|
23
|
23
|
|
24
|
|
-- (void)testApplyOptions_backgroundImageDefaultNil {
|
|
24
|
+- (void)testApplyOptions_backgroundImageDefaultNilShouldNotAddSubview {
|
25
|
25
|
[self.uut applyOptions:self.options];
|
26
|
|
- XCTAssertNil(((UIImageView *)self.bindedViewController.view.subviews[0]).image);
|
|
26
|
+ XCTAssertTrue((self.bindedViewController.view.subviews.count) == 0);
|
27
|
27
|
}
|
28
|
28
|
|
29
|
29
|
- (void)testApplyOptions_topBarPrefersLargeTitleDefaultFalse {
|
|
@@ -55,7 +55,7 @@
|
55
|
55
|
- (void)testApplyOptions_drawBehindTabBarTrueWhenVisibleFalse {
|
56
|
56
|
self.options.bottomTabs.visible = [[Bool alloc] initWithValue:@(0)];
|
57
|
57
|
[[(id)self.bindedViewController expect] rnn_setDrawBehindTabBar:YES];
|
58
|
|
- [self.uut applyOptions:self.options];
|
|
58
|
+ [self.uut applyOptionsOnInit:self.options];
|
59
|
59
|
[(id)self.bindedViewController verify];
|
60
|
60
|
}
|
61
|
61
|
|
|
@@ -85,4 +85,36 @@
|
85
|
85
|
[(id)self.bindedViewController verify];
|
86
|
86
|
}
|
87
|
87
|
|
|
88
|
+-(void)testApplyOptionsOnInit_TopBarDrawUnder_true {
|
|
89
|
+ self.options.topBar.drawBehind = [[Bool alloc] initWithValue:@(1)];
|
|
90
|
+
|
|
91
|
+ [[(id)self.bindedViewController expect] rnn_setDrawBehindTopBar:YES];
|
|
92
|
+ [self.uut applyOptionsOnInit:self.options];
|
|
93
|
+ [(id)self.bindedViewController verify];
|
|
94
|
+}
|
|
95
|
+
|
|
96
|
+-(void)testApplyOptionsOnInit_TopBarDrawUnder_false {
|
|
97
|
+ self.options.topBar.drawBehind = [[Bool alloc] initWithValue:@(0)];
|
|
98
|
+
|
|
99
|
+ [[(id)self.bindedViewController expect] rnn_setDrawBehindTopBar:NO];
|
|
100
|
+ [self.uut applyOptionsOnInit:self.options];
|
|
101
|
+ [(id)self.bindedViewController verify];
|
|
102
|
+}
|
|
103
|
+
|
|
104
|
+-(void)testApplyOptionsOnInit_BottomTabsDrawUnder_true {
|
|
105
|
+ self.options.bottomTabs.drawBehind = [[Bool alloc] initWithValue:@(1)];
|
|
106
|
+
|
|
107
|
+ [[(id)self.bindedViewController expect] rnn_setDrawBehindTabBar:YES];
|
|
108
|
+ [self.uut applyOptionsOnInit:self.options];
|
|
109
|
+ [(id)self.bindedViewController verify];
|
|
110
|
+}
|
|
111
|
+
|
|
112
|
+-(void)testApplyOptionsOnInit_BottomTabsDrawUnder_false {
|
|
113
|
+ self.options.bottomTabs.drawBehind = [[Bool alloc] initWithValue:@(0)];
|
|
114
|
+
|
|
115
|
+ [[(id)self.bindedViewController expect] rnn_setDrawBehindTabBar:NO];
|
|
116
|
+ [self.uut applyOptionsOnInit:self.options];
|
|
117
|
+ [(id)self.bindedViewController verify];
|
|
118
|
+}
|
|
119
|
+
|
88
|
120
|
@end
|