IOS-937 make testOutgoingColors more succinct
authorDirk Zimmermann <dirk@pep-project.org>
Fri, 09 Feb 2018 14:08:48 +0100
changeset 4380cf0dad6d7c6
parent 437 28774351ee04
child 439 1fd920a2ce00
IOS-937 make testOutgoingColors more succinct
pEpObjCTests/PEPSessionTest.m
     1.1 --- a/pEpObjCTests/PEPSessionTest.m	Fri Feb 09 13:18:44 2018 +0100
     1.2 +++ b/pEpObjCTests/PEPSessionTest.m	Fri Feb 09 14:08:48 2018 +0100
     1.3 @@ -185,12 +185,14 @@
     1.4  
     1.5      //Message
     1.6  
     1.7 +    PEPIdentity *identBob = [[PEPIdentity alloc]
     1.8 +                             initWithAddress:@"pep.test.bob@pep-project.org"
     1.9 +                             userID:@"42" userName:@"pEp Test Bob"
    1.10 +                             isOwn:NO];
    1.11 +
    1.12      PEPMessage *msg = [PEPMessage new];
    1.13      msg.from = identAlice;
    1.14 -    msg.to = @[[[PEPIdentity alloc] initWithAddress:@"pep.test.bob@pep-project.org"
    1.15 -                                             userID: @"42"
    1.16 -                                           userName:@"pEp Test Bob"
    1.17 -                                              isOwn:NO]];
    1.18 +    msg.to = @[identBob];
    1.19      msg.shortMessage = @"All Green Test";
    1.20      msg.longMessage = @"This is a text content";
    1.21      msg.direction = PEP_dir_outgoing;
    1.22 @@ -203,12 +205,8 @@
    1.23      // pEp Test Bob (test key, don't use) <pep.test.bob@pep-project.org>
    1.24      // BFCDB7F301DEEEBBF947F29659BFF488C9C2EE39
    1.25      [PEPTestUtils importBundledKey:@"0xC9C2EE39.asc"];
    1.26 +    identBob.fingerPrint = @"BFCDB7F301DEEEBBF947F29659BFF488C9C2EE39";
    1.27  
    1.28 -    PEPIdentity *identBob = [[PEPIdentity alloc]
    1.29 -                             initWithAddress:@"pep.test.bob@pep-project.org"
    1.30 -                             userID:@"42" userName:@"pEp Test Bob"
    1.31 -                             isOwn:NO
    1.32 -                             fingerPrint:@"BFCDB7F301DEEEBBF947F29659BFF488C9C2EE39"];
    1.33      [self updateAndVerifyPartnerIdentity:identBob session:session];
    1.34  
    1.35      // Should be yellow, since no handshake happened.