-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
Showing
6 changed files
with
46 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
32 changes: 32 additions & 0 deletions
32
lib/ios/ReactNativeNavigationTests/RNNSideMenuControllerTest.m
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
#import <XCTest/XCTest.h> | ||
#import "RNNSideMenuController.h" | ||
#import "RNNRootViewController.h" | ||
|
||
@interface RNNSideMenuControllerTest : XCTestCase | ||
@property (nonatomic, strong) RNNSideMenuController *uut; | ||
@property (nonatomic, strong) RNNSideMenuChildVC *centerVC; | ||
@property (nonatomic, strong) RNNSideMenuChildVC *leftVC; | ||
@property (nonatomic, strong) RNNSideMenuChildVC *rightVC; | ||
@end | ||
|
||
@implementation RNNSideMenuControllerTest | ||
|
||
- (void)setUp { | ||
[super setUp]; | ||
_leftVC = [[RNNSideMenuChildVC alloc] initWithLayoutInfo:nil childViewControllers:@[[RNNRootViewController new]] options:nil defaultOptions:nil presenter:nil type:RNNSideMenuChildTypeLeft]; | ||
_rightVC = [[RNNSideMenuChildVC alloc] initWithLayoutInfo:nil childViewControllers:@[[RNNRootViewController new]] options:nil defaultOptions:nil presenter:nil type:RNNSideMenuChildTypeRight]; | ||
_centerVC = [[RNNSideMenuChildVC alloc] initWithLayoutInfo:nil childViewControllers:@[[RNNRootViewController new]] options:nil defaultOptions:nil presenter:nil type:RNNSideMenuChildTypeCenter]; | ||
self.uut = [[RNNSideMenuController alloc] initWithLayoutInfo:nil childViewControllers:@[_leftVC, _centerVC, _rightVC] options:[[RNNNavigationOptions alloc] initEmptyOptions] defaultOptions:nil presenter:nil]; | ||
} | ||
|
||
- (void)testSetSideMenuWidthShouldUpdateLeftReactViewFrameWidth { | ||
[self.uut side:MMDrawerSideLeft width:100]; | ||
XCTAssertEqual(self.uut.left.child.view.frame.size.width, 100.f); | ||
} | ||
|
||
- (void)testSetSideMenuWidthShouldUpdateRightReactViewFrameWidth { | ||
[self.uut side:MMDrawerSideRight width:150]; | ||
XCTAssertEqual(self.uut.right.child.view.frame.size.width, 150.f); | ||
} | ||
|
||
@end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -82,7 +82,4 @@ - (void)testApplyOptionsOnInitShouldSetBezelDrawerGestureMode { | |
[self.bindedViewController verify]; | ||
} | ||
|
||
|
||
|
||
|
||
@end |