react-native-navigation的迁移库

RNNBottomTabOptionsTest.m 2.5KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081
  1. #import <XCTest/XCTest.h>
  2. #import "RNNBottomTabOptions.h"
  3. @interface RNNBottomTabOptionsTest : XCTestCase
  4. @property (nonatomic, retain) RNNBottomTabOptions* uut;
  5. @end
  6. @implementation RNNBottomTabOptionsTest
  7. - (void)setUp {
  8. [super setUp];
  9. // self.uut = [[RNNBottomTabOptions alloc] initEmptyOptions];
  10. }
  11. //- (void)test_tabBarTextFontFamily_validFont {
  12. // UIViewController* viewController = [UIViewController new];
  13. //
  14. // NSString* inputFont = @"HelveticaNeue";
  15. // UIFont* expectedFont = [UIFont fontWithName:inputFont size:10];
  16. //
  17. // self.uut.fontFamily = inputFont;
  18. // self.uut.text = @"Tab 1";
  19. //
  20. // [self.uut applyOn:viewController];
  21. //
  22. // NSDictionary* attributes = [viewController.tabBarItem titleTextAttributesForState:UIControlStateNormal];
  23. // XCTAssertTrue([attributes[@"NSFont"] isEqual:expectedFont]);
  24. //}
  25. //
  26. //- (void)test_tabBarTextFontSize_withoutTextFontFamily_withoutTextColor {
  27. // UIViewController* viewController = [UIViewController new];
  28. //
  29. // UIFont* expectedFont = [UIFont systemFontOfSize:15];
  30. //
  31. // self.uut.fontSize = @(15);
  32. // self.uut.text = @"Tab 1";
  33. //
  34. // [self.uut applyOn:viewController];
  35. //
  36. // NSDictionary* attributes = [viewController.tabBarItem titleTextAttributesForState:UIControlStateNormal];
  37. // XCTAssertTrue([attributes[@"NSFont"] isEqual:expectedFont]);
  38. //}
  39. //
  40. //- (void)test_tabBarTextFontSize_withoutTextFontFamily {
  41. // UIViewController* viewController = [UIViewController new];
  42. //
  43. // UIFont* expectedFont = [UIFont systemFontOfSize:15];
  44. //
  45. // self.uut.fontSize = @(15);
  46. // self.uut.text = @"Tab 1";
  47. //
  48. // [self.uut applyOn:viewController];
  49. //
  50. // NSDictionary* attributes = [viewController.tabBarItem titleTextAttributesForState:UIControlStateNormal];
  51. // XCTAssertTrue([attributes[@"NSFont"] isEqual:expectedFont]);
  52. //}
  53. //
  54. //- (void)test_tabBarTextFontSize_withTextFontFamily_withTextColor {
  55. // UIViewController* viewController = [UIViewController new];
  56. //
  57. // NSString* inputFont = @"HelveticaNeue";
  58. // UIFont* expectedFont = [UIFont fontWithName:inputFont size:15];
  59. //
  60. // self.uut.fontSize = @(15);
  61. // self.uut.text = @"Tab 1";
  62. // self.uut.fontFamily = inputFont;
  63. // self.uut.textColor = @(4279979127);
  64. // [self.uut applyOn:viewController];
  65. //
  66. // NSDictionary* attributes = [viewController.tabBarItem titleTextAttributesForState:UIControlStateNormal];
  67. // UIColor* color = attributes[NSForegroundColorAttributeName];
  68. // UIColor* expectedColor = [RCTConvert UIColor:@(4279979127)];
  69. //
  70. // XCTAssertTrue([color isEqual:expectedColor]);
  71. // XCTAssertTrue([attributes[@"NSFont"] isEqual:expectedFont]);
  72. //}
  73. @end