pEpObjCTests/PepTests.m
author Dirk Zimmermann <dirk@pep-project.org>
Fri, 06 Apr 2018 10:49:41 +0200
changeset 557 7cf2f6710453
parent 402 df62d09d2c8a
child 560 6bf2a4dd111b
permissions -rw-r--r--
IOSAD-90 encryptMessage:forSelf
     1 //
     2 //  PepTests.m
     3 //  pEpiOSAdapter
     4 //
     5 //  Created by Dirk Zimmermann on 01/08/16.
     6 //  Copyright © 2016 p≡p. All rights reserved.
     7 //
     8 
     9 #import <XCTest/XCTest.h>
    10 
    11 #import "PEPObjCAdapter.h"
    12 #import "PEPSession.h"
    13 #import "PEPLanguage.h"
    14 
    15 @interface PepTests : XCTestCase
    16 @end
    17 
    18 @implementation PepTests
    19 
    20 - (void)setUp {
    21     [super setUp];
    22     [PEPObjCAdapter setupTrustWordsDB:[NSBundle bundleForClass:[self class]]];
    23 }
    24 
    25 - (void)testSessionFinalization {
    26     PEPSession *session = [[PEPSession alloc] init];
    27     session = nil;
    28 }
    29 
    30 - (void)testLanguageList {
    31     PEPSession *session = [[PEPSession alloc] init];
    32     NSArray<PEPLanguage *> *langs = [session languageList];
    33     XCTAssertGreaterThan(langs.count, 0);
    34     BOOL foundEn = NO;
    35     for (PEPLanguage *lang in langs) {
    36         if ([lang.code isEqualToString:@"en"]) {
    37             foundEn = YES;
    38         }
    39     }
    40     XCTAssertTrue(foundEn);
    41 }
    42 
    43 @end