react-native-navigation的迁移库

RNNControllerFactoryTest.m 824B

123456789101112131415161718192021222324252627282930313233
  1. #import <XCTest/XCTest.h>
  2. #import "RNNControllerFactory.h"
  3. #import "RCTRootView.h"
  4. @interface RNNControllerFactoryTest : XCTestCase
  5. @end
  6. @implementation RNNControllerFactoryTest
  7. - (void)setUp {
  8. [super setUp];
  9. // Put setup code here. This method is called before the invocation of each test method in the class.
  10. }
  11. - (void)tearDown {
  12. [super tearDown];
  13. }
  14. - (void)testExample {
  15. NSDictionary* layout = @{
  16. @"container": @{
  17. @"name": @"myName",
  18. @"id": @"my-id"
  19. }
  20. };
  21. UIViewController* rootViewController = [RNNControllerFactory createRootViewController:layout];
  22. XCTAssert([((RCTRootView*)rootViewController.view).moduleName isEqualToString:@"myName"]);
  23. }
  24. @end