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