IOSAD-61 testEncryptToMySelf IOSAD-61
authorDirk Zimmermann <dirk@pep-project.org>
Mon, 06 Nov 2017 10:51:32 +0100
branchIOSAD-61
changeset 345f598a09939ff
parent 344 229b571fd4cb
child 346 6e288f887015
IOSAD-61 testEncryptToMySelf
pEpObjCTests/iOSTests.m
     1.1 --- a/pEpObjCTests/iOSTests.m	Mon Nov 06 10:47:41 2017 +0100
     1.2 +++ b/pEpObjCTests/iOSTests.m	Mon Nov 06 10:51:32 2017 +0100
     1.3 @@ -1466,18 +1466,18 @@
     1.4  
     1.5  - (PEPDict *)internalEncryptToMySelfKeys:(PEPStringList **)keys
     1.6  {
     1.7 -    NSMutableDictionary *me = @{kPepUsername: kPepUsername,
     1.8 -                                kPepAddress: @"me@peptest.ch"}.mutableCopy;
     1.9 +    PEPIdentity *me = [[PEPIdentity alloc] initWithAddress:@"me@peptest.ch" userName:@"userName"];
    1.10      [session mySelf:me];
    1.11 -    XCTAssertNotNil(me[kPepFingerprint]);
    1.12 +    XCTAssertNotNil(me.fingerPrint);
    1.13  
    1.14      // Create draft
    1.15      NSString *shortMessage = @"Subject";
    1.16      NSString *longMessage = @"Oh, this is a long body text!";
    1.17 -    PEPDict *mail = mailFromTo(me, me, shortMessage, longMessage, YES);
    1.18 +    PEPDict *mail = mailFromTo((PEPDict *) me, (PEPDict *) me, shortMessage, longMessage,
    1.19 +                               YES);
    1.20  
    1.21      NSMutableDictionary *encDict;
    1.22 -    PEP_STATUS status = [session encryptMessageDict:mail identity:me dest:&encDict];
    1.23 +    PEP_STATUS status = [session encryptMessageDict:mail identity:(PEPDict *) me dest:&encDict];
    1.24      XCTAssertEqual(status, 0);
    1.25      XCTAssertEqualObjects(encDict[kPepShortMessage], @"p≡p");
    1.26