react-native-navigation的迁移库

RNNExternalViewControllerTests.m 1.1KB

123456789101112131415161718192021222324252627282930
  1. #import <XCTest/XCTest.h>
  2. #import <OCMock/OCMock.h>
  3. #import <ReactNativeNavigation/RNNExternalViewController.h>
  4. #import <ReactNativeNavigation/RNNCustomViewController.h>
  5. @interface RNNExternalViewControllerTest : XCTestCase
  6. @property (nonatomic, strong) RNNExternalViewController* uut;
  7. @property (nonatomic, strong) RNNCustomViewController* customViewController;
  8. @end
  9. @implementation RNNExternalViewControllerTest
  10. - (void)setUp {
  11. [super setUp];
  12. self.customViewController = [[RNNCustomViewController alloc] init];
  13. RNNLayoutInfo* layoutInfo = [[RNNLayoutInfo alloc] init];
  14. layoutInfo.componentId = @"externalComponentId";
  15. RNNComponentPresenter* presenter = [[RNNComponentPresenter alloc] initWithComponentRegistry:nil defaultOptions:nil];
  16. self.uut = [[RNNExternalViewController alloc] initWithLayoutInfo:layoutInfo eventEmitter:nil presenter:presenter options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil viewController:self.customViewController];
  17. }
  18. - (void)testLoadView_withMainScreenBounds {
  19. XCTAssertTrue(CGRectEqualToRect(self.uut.view.bounds, UIScreen.mainScreen.bounds));
  20. }
  21. @end