forked from wix/react-native-navigation
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathUITabBarController+RNNOptionsTest.m
48 lines (35 loc) · 1.14 KB
/
UITabBarController+RNNOptionsTest.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#import <XCTest/XCTest.h>
#import "UITabBarController+RNNOptions.h"
@interface UITabBarController_RNNOptionsTest : XCTestCase
@property (nonatomic, retain) UITabBarController* uut;
@end
@implementation UITabBarController_RNNOptionsTest
- (void)setUp {
[super setUp];
self.uut = [UITabBarController new];
}
- (void)test_tabBarTranslucent_true {
[self.uut rnn_setTabBarTranslucent:YES];
XCTAssertTrue(self.uut.tabBar.translucent);
}
- (void)test_tabBarTranslucent_false {
[self.uut rnn_setTabBarTranslucent:NO];
XCTAssertFalse(self.uut.tabBar.translucent);
}
- (void)test_tabBarHideShadow_default {
XCTAssertFalse(self.uut.tabBar.clipsToBounds);
}
- (void)test_tabBarHideShadow_true {
[self.uut rnn_setTabBarHideShadow:YES];
XCTAssertTrue(self.uut.tabBar.clipsToBounds);
}
- (void)test_tabBarHideShadow_false {
[self.uut rnn_setTabBarHideShadow:NO];
XCTAssertFalse(self.uut.tabBar.clipsToBounds);
}
- (void)test_tabBarBackgroundColor {
UIColor* tabBarBackgroundColor = [UIColor redColor];
[self.uut rnn_setTabBarBackgroundColor:tabBarBackgroundColor];
XCTAssertTrue([self.uut.tabBar.barTintColor isEqual:tabBarBackgroundColor]);
}
@end