Skip to content
This repository has been archived by the owner on Mar 26, 2021. It is now read-only.

Commit

Permalink
fix: Fixes tests
Browse files Browse the repository at this point in the history
  • Loading branch information
craighowarth committed Apr 19, 2018
1 parent 8995300 commit fb93fd5
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions NYTPhotoViewerTests/NYTPhotoViewControllerTests.m
Original file line number Diff line number Diff line change
Expand Up @@ -19,34 +19,34 @@ @interface NYTPhotoViewControllerTests : XCTestCase
@implementation NYTPhotoViewControllerTests

- (void)testScalingImageViewExistsAferInitialization {
NYTPhotoViewController *photoViewController = [[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] loadingView:nil notificationCenter:nil];
NYTPhotoViewController *photoViewController = [[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] itemIndex:0 loadingView:nil notificationCenter:nil];
XCTAssertNotNil(photoViewController.scalingImageView);
}

- (void)testDoubleTapGestureRecognizerExistsAferInitialization {
NYTPhotoViewController *photoViewController = [[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] loadingView:nil notificationCenter:nil];
NYTPhotoViewController *photoViewController = [[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] itemIndex:0 loadingView:nil notificationCenter:nil];
XCTAssertNotNil(photoViewController.doubleTapGestureRecognizer);
}

- (void)testLoadingViewExistsAferNilInitialization {
NYTPhotoViewController *photoViewController = [[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] loadingView:nil notificationCenter:nil];
NYTPhotoViewController *photoViewController = [[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] itemIndex:0 loadingView:nil notificationCenter:nil];
XCTAssertNotNil(photoViewController.loadingView);
}

- (void)testDesignatedInitializerAcceptsNilForPhotoArgument {
XCTAssertNoThrow([[NYTPhotoViewController alloc] initWithPhoto:nil loadingView:[[UIView alloc] init] notificationCenter:[NSNotificationCenter defaultCenter]]);
XCTAssertNoThrow([[NYTPhotoViewController alloc] initWithPhoto:nil itemIndex:0 loadingView:[[UIView alloc] init] notificationCenter:[NSNotificationCenter defaultCenter]]);
}

- (void)testDesignatedInitializerAcceptsNilForLoadingViewArgument {
XCTAssertNoThrow([[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] loadingView:nil notificationCenter:[NSNotificationCenter defaultCenter]]);
XCTAssertNoThrow([[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] itemIndex:0 loadingView:nil notificationCenter:[NSNotificationCenter defaultCenter]]);
}

- (void)testDesignatedInitializerAcceptsNilForNotificationCenterArgument {
XCTAssertNoThrow([[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] loadingView:[[UIView alloc] init] notificationCenter:nil]);
XCTAssertNoThrow([[NYTPhotoViewController alloc] initWithPhoto:[self newTestPhoto] itemIndex:0 loadingView:[[UIView alloc] init] notificationCenter:nil]);
}

- (void)testDesignatedInitializerAcceptsNilForAllArguments {
XCTAssertNoThrow([[NYTPhotoViewController alloc] initWithPhoto:nil loadingView:nil notificationCenter:nil]);
XCTAssertNoThrow([[NYTPhotoViewController alloc] initWithPhoto:nil itemIndex:0 loadingView:nil notificationCenter:nil]);
}

- (NYTExamplePhoto *)newTestPhoto {
Expand Down

0 comments on commit fb93fd5

Please sign in to comment.