IOSAD-61 testEncryptBcc IOSAD-61
authorDirk Zimmermann <dirk@pep-project.org>
Mon, 06 Nov 2017 10:45:22 +0100
branchIOSAD-61
changeset 343a446b8346ef5
parent 342 cbd67dba2ee7
child 344 229b571fd4cb
IOSAD-61 testEncryptBcc
pEpObjCTests/iOSTests.m
     1.1 --- a/pEpObjCTests/iOSTests.m	Mon Nov 06 10:41:00 2017 +0100
     1.2 +++ b/pEpObjCTests/iOSTests.m	Mon Nov 06 10:45:22 2017 +0100
     1.3 @@ -1204,7 +1204,7 @@
     1.4  
     1.5      NSMutableDictionary *meOrig =
     1.6      @{ kPepAddress: @"me@dontcare.me",
     1.7 -       kPepUserID: @"me",
     1.8 +       kPepUserID: s_userID,
     1.9         kPepFingerprint: @"CC1F73F6FB774BF08B197691E3BFBCA9248FC681",
    1.10         kPepUsername: @"me" }.mutableCopy;
    1.11  
    1.12 @@ -1217,7 +1217,7 @@
    1.13  
    1.14      __block NSMutableDictionary *pepEncMail;
    1.15      {
    1.16 -        NSMutableDictionary *me = meOrig.mutableCopy;
    1.17 +        PEPIdentity *me = [[PEPIdentity alloc] initWithDictionary:meOrig];
    1.18  
    1.19          NSMutableDictionary *partner1 = partner1Orig.mutableCopy;
    1.20  
    1.21 @@ -1229,8 +1229,8 @@
    1.22          [session importKey:pubKeyMe];
    1.23          [session importKey:secKeyMe];
    1.24          [session mySelf:me];
    1.25 -        XCTAssertNotNil(me[kPepFingerprint]);
    1.26 -        XCTAssertEqualObjects(me[kPepFingerprint], meOrig[kPepFingerprint]);
    1.27 +        XCTAssertNotNil(me.fingerPrint);
    1.28 +        XCTAssertEqualObjects(me.fingerPrint, meOrig[kPepFingerprint]);
    1.29          [session importKey:pubKeyPartner1];
    1.30          PEP_STATUS status = [session encryptMessageDict:mail extra:nil dest:&pepEncMail];
    1.31          XCTAssertEqual(status, PEP_STATUS_OK);
    1.32 @@ -1240,7 +1240,7 @@
    1.33  
    1.34      [self pEpSetUp];
    1.35      {
    1.36 -        NSMutableDictionary *partner1 = partner1Orig.mutableCopy;
    1.37 +        PEPIdentity *partner1 = [[PEPIdentity alloc] initWithDictionary:partner1Orig];
    1.38  
    1.39          NSString *privateKeyPartner1 = [self
    1.40                                          loadStringByName:@"partner1_F2D281C2789DD7F6_sec.asc"];
    1.41 @@ -1251,8 +1251,8 @@
    1.42          [session importKey:pubKeyMe];
    1.43  
    1.44          [session mySelf:partner1];
    1.45 -        XCTAssertNotNil(partner1[kPepFingerprint]);
    1.46 -        XCTAssertEqualObjects(partner1[kPepFingerprint], partner1Orig[kPepFingerprint]);
    1.47 +        XCTAssertNotNil(partner1.fingerPrint);
    1.48 +        XCTAssertEqualObjects(partner1.fingerPrint, partner1Orig[kPepFingerprint]);
    1.49  
    1.50          NSMutableDictionary *me = meOrig.mutableCopy;
    1.51          [session updateIdentity:me];