Browse Source

IOSAD-191 Small refactor for code review.

IOSAD-191
David Alarcon 1 year ago
parent
commit
a6fc71362b
4 changed files with 8 additions and 4 deletions
  1. +1
    -0
      PEPObjCAdapterTypesTests_iOS/PEPAttachment+SecureCodingTest.m
  2. +1
    -0
      PEPObjCAdapterTypesTests_iOS/PEPIdentity+SecureCodingTest.m
  3. +1
    -0
      PEPObjCAdapterTypesTests_iOS/PEPLanguage+SecureCodingTest.m
  4. +5
    -4
      PEPObjCAdapterTypesTests_iOS/PEPMessage+SecureCodingTest.m

+ 1
- 0
PEPObjCAdapterTypesTests_iOS/PEPAttachment+SecureCodingTest.m View File

@ -18,6 +18,7 @@
- (void)testConformsSecureCodingProtocol {
PEPAttachment *testee = [PEPAttachment new];
XCTAssertTrue([testee conformsToProtocol:@protocol(NSSecureCoding)]);
}


+ 1
- 0
PEPObjCAdapterTypesTests_iOS/PEPIdentity+SecureCodingTest.m View File

@ -18,6 +18,7 @@
- (void)testConformsSecureCodingProtocol {
PEPIdentity *testee = [PEPIdentity new];
XCTAssertTrue([testee conformsToProtocol:@protocol(NSSecureCoding)]);
}


+ 1
- 0
PEPObjCAdapterTypesTests_iOS/PEPLanguage+SecureCodingTest.m View File

@ -18,6 +18,7 @@
- (void)testConformsSecureCodingProtocol {
PEPLanguage *testee = [PEPLanguage new];
XCTAssertTrue([testee conformsToProtocol:@protocol(NSSecureCoding)]);
}


+ 5
- 4
PEPObjCAdapterTypesTests_iOS/PEPMessage+SecureCodingTest.m View File

@ -16,13 +16,13 @@
#import "NSObject+Extension.h"
@interface PEPMessage_SecureCodingTest : XCTestCase
@end
@implementation PEPMessage_SecureCodingTest
- (void)testConformsSecureCodingProtocol {
PEPMessage *testee = [PEPMessage new];
XCTAssertTrue([testee conformsToProtocol:@protocol(NSSecureCoding)]);
}
@ -83,8 +83,7 @@
PEPMessage *testee = [self messageWithAllFieldsFilled];
PEPMessage *unarchivedTestee = [self archiveAndUnarchiveMessage:testee];
XCTAssertEqualObjects(testee.longMessageFormatted,
unarchivedTestee.longMessageFormatted);
XCTAssertEqualObjects(testee.longMessageFormatted, unarchivedTestee.longMessageFormatted);
}
- (void)testMessageReplyTo {
@ -192,7 +191,9 @@
message.replyTo = @[identity];
message.inReplyTo = @[[NSString stringWithFormat: @"19980507220459.5655.%@", identity.address]];
message.references = @[[NSString stringWithFormat: @"19980509035615.40087.%@", identity.address]];
message.references = @[[NSString stringWithFormat:
@"19980509035615.40087.%@",
identity.address]];
NSDate *yesterday = [NSCalendar.currentCalendar dateByAddingUnit:NSCalendarUnitDay
value:-1 toDate:[NSDate now]


Loading…
Cancel
Save