Skip to content

Commit

Permalink
style: reformat long lines in test
Browse files Browse the repository at this point in the history
  • Loading branch information
paulz committed Jan 16, 2020
1 parent e49158d commit 3a1260e
Showing 1 changed file with 13 additions and 7 deletions.
20 changes: 13 additions & 7 deletions Tests/KWNotificationMatcherTest.m
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,8 @@ - (void)testItShouldHaveTheRightMatcherStrings {
- (void)testEachMatcherStringIsANameOfAMatchingMethod {
NSArray *matcherStrings = [KWNotificationMatcher matcherStrings];
for (NSString *string in matcherStrings) {
XCTAssertTrue([KWNotificationMatcher instancesRespondToSelector:NSSelectorFromString(string)], @"expect to find an instance method: %@", string);
XCTAssertTrue([KWNotificationMatcher instancesRespondToSelector:NSSelectorFromString(string)],
@"expect to find an instance method: %@", string);
}
}

Expand Down Expand Up @@ -101,28 +102,33 @@ - (void)testItShouldHaveHumanReadableDescription {
- (void)testItShouldHaveInformativeFailureMessageForShould {
id matcher = [KWNotificationMatcher matcherWithSubject:NSPortDidBecomeInvalidNotification];
[matcher bePosted];
XCTAssertEqualObjects([matcher failureMessageForShould], @"expect to receive \"NSPortDidBecomeInvalidNotification\" notification", @"failure message should match");
XCTAssertEqualObjects([matcher failureMessageForShould],
@"expect to receive \"NSPortDidBecomeInvalidNotification\" notification",
@"failure message should match");
}

- (void)testItShouldHaveInformativeFailureMessageForShouldWithObject {
id matcher = [KWNotificationMatcher matcherWithSubject:NSPortDidBecomeInvalidNotification];
[matcher bePostedWithObject:@"sender"];
XCTAssertEqualObjects([matcher failureMessageForShould], @"expect to receive \"NSPortDidBecomeInvalidNotification\" "
"notification with object: sender", @"failure message should match");
XCTAssertEqualObjects([matcher failureMessageForShould],
@"expect to receive \"NSPortDidBecomeInvalidNotification\" notification with object: sender",
@"failure message should match");
}

- (void)testItShouldHaveInformativeFailureMessageForShouldWithUserInfo {
id matcher = [KWNotificationMatcher matcherWithSubject:NSPortDidBecomeInvalidNotification];
[matcher bePostedWithUserInfo:@{@"message":@"text"}];
XCTAssertEqualObjects([matcher failureMessageForShould], @"expect to receive \"NSPortDidBecomeInvalidNotification\" "
"notification with user info: {\n message = text;\n}", @"failure message should match");
XCTAssertEqualObjects([matcher failureMessageForShould],
@"expect to receive \"NSPortDidBecomeInvalidNotification\" notification with user info: {\n message = text;\n}",
@"failure message should match");
}

- (void)testItShouldHaveInformativeFailureMessageForShouldWithObjectAndUserInfo {
id matcher = [KWNotificationMatcher matcherWithSubject:NSPortDidBecomeInvalidNotification];
[matcher bePostedWithObject:@"sender" userInfo:@{@"message":@"text"}];
XCTAssertEqualObjects([matcher failureMessageForShould], @"expect to receive \"NSPortDidBecomeInvalidNotification\" "
"notification with object: sender and user info: {\n message = text;\n}", @"failure message should match");
"notification with object: sender and user info: {\n message = text;\n}",
@"failure message should match");
}

- (void)testItShouldHaveInformativeFailureMessageForShouldNot {
Expand Down

0 comments on commit 3a1260e

Please sign in to comment.