pEpObjCTests/PEPSessionTest.m
changeset 494 6f45696ae8b3
parent 491 721c4077e76d
child 496 aac960369d6f
     1.1 --- a/pEpObjCTests/PEPSessionTest.m	Wed Feb 21 12:05:21 2018 +0100
     1.2 +++ b/pEpObjCTests/PEPSessionTest.m	Wed Feb 21 12:05:22 2018 +0100
     1.3 @@ -966,14 +966,25 @@
     1.4  {
     1.5      PEPSession *session = [PEPSession new];
     1.6  
     1.7 -    PEPIdentity *identTest001 =
     1.8 +    XCTAssertTrue([PEPTestUtils
     1.9 +                   importBundledKey:@"IOSAD-76_iostest002@peptest.ch.pub.key" session:session]);
    1.10 +
    1.11 +    PEPIdentity *me = [self
    1.12 +                       checkMySelfImportingKeyFilePath:@"IOSAD-76_iostest002@peptest.ch.sec.key"
    1.13 +                       address:@"iostest002@peptest.ch"
    1.14 +                       userID:@"iOS Test 002"
    1.15 +                       fingerPrint:@"4ABE3AAF59AC32CFE4F86500A9411D176FF00E97"
    1.16 +                       session:session];
    1.17 +    XCTAssertEqual([session identityRating:me], PEP_rating_trusted_and_anonymized);
    1.18 +
    1.19 +    PEPIdentity *identTest010 =
    1.20      [self
    1.21 -     checkImportingKeyFilePath:@"iOS Test 001 iostest001@peptest.ch (0x467E45F8) pub.asc"
    1.22 -     address:@"iostest001@peptest.ch"
    1.23 -     userID:@"iOS_Test_001"
    1.24 -     fingerPrint:@"118DD76CC408888101300A0D10807027467E45F8"
    1.25 +     checkImportingKeyFilePath:@"IOSAD-76_test010@peptest.ch.pub.key"
    1.26 +     address:@"test010@peptest.ch"
    1.27 +     userID:@"Test_010"
    1.28 +     fingerPrint:@"97C5F27F9F81296EA3694FBCF407FCD36ED1D1AD"
    1.29       session: session];
    1.30 -    XCTAssertNotNil(identTest001);
    1.31 +    XCTAssertNotNil(identTest010);
    1.32  }
    1.33  
    1.34  #pragma mark - configUnencryptedSubject
    1.35 @@ -1039,7 +1050,7 @@
    1.36                                       fingerPrint:(NSString *)fingerPrint
    1.37                                           session:(PEPSession *)session
    1.38  {
    1.39 -    [PEPTestUtils importBundledKey:filePath session:session];
    1.40 +    XCTAssertTrue([PEPTestUtils importBundledKey:filePath session:session]);
    1.41  
    1.42      // Our test user:
    1.43      PEPIdentity *identTest = [[PEPIdentity alloc]
    1.44 @@ -1128,10 +1139,6 @@
    1.45      [PEPTestUtils cleanUp];
    1.46  }
    1.47  
    1.48 -- (void)pEpSetUp
    1.49 -{
    1.50 -}
    1.51 -
    1.52  - (void)helperXEncStatusForOutgoingEncryptdMailToSelf:(BOOL)toSelf
    1.53                                         expectedRating:(PEP_rating)expectedRating
    1.54  {
    1.55 @@ -1140,7 +1147,7 @@
    1.56      // Partner pubkey for the test:
    1.57      // pEp Test Alice (test key don't use) <pep.test.alice@pep-project.org>
    1.58      // 4ABE3AAF59AC32CFE4F86500A9411D176FF00E97
    1.59 -    [PEPTestUtils importBundledKey:@"0x6FF00E97.asc" session:session];
    1.60 +    XCTAssertTrue([PEPTestUtils importBundledKey:@"0x6FF00E97.asc" session:session]);
    1.61  
    1.62      PEPIdentity *identAlice = [[PEPIdentity alloc]
    1.63                                 initWithAddress:@"pep.test.alice@pep-project.org"