pEpObjCTests/TestUtils/PEPTestUtils.h
author Dirk Zimmermann <dirk@pep-project.org>
Tue, 24 Apr 2018 13:29:19 +0200
branchIOSAD-92
changeset 594 a9cae3a6f78d
parent 579 1ddf35bfa4f3
child 754 78dbef38ae98
permissions -rw-r--r--
IOSAD-92 PEPIdentity using hashBasedOnKeys etc.
andreas@391
     1
//
andreas@391
     2
//  PEPTestUtils.h
andreas@391
     3
//  pEpObjCAdapter
andreas@391
     4
//
andreas@391
     5
//  Created by Andreas Buff on 17.01.18.
andreas@391
     6
//  Copyright © 2018 p≡p. All rights reserved.
andreas@391
     7
//
andreas@391
     8
andreas@391
     9
#import <Foundation/Foundation.h>
andreas@391
    10
andreas@391
    11
@class PEPIdentity;
andreas@391
    12
@class PEPInternalSession;
andreas@391
    13
@class PEPMessage;
dirk@488
    14
@class PEPSession;
andreas@391
    15
andreas@391
    16
NS_ASSUME_NONNULL_BEGIN
andreas@391
    17
andreas@391
    18
extern NSString * const ownUserId;
andreas@391
    19
andreas@391
    20
@interface PEPTestUtils : NSObject
andreas@391
    21
andreas@411
    22
+ (PEPIdentity *)foreignPepIdentityWithAddress:(NSString *)address userName:(NSString *)username;
andreas@411
    23
andreas@411
    24
+ (PEPIdentity *)ownPepIdentityWithAddress:(NSString *)address userName:(NSString *)username;
andreas@411
    25
dirk@488
    26
+ (BOOL)importBundledKey:(NSString *)item session:(PEPSession *)session;
andreas@391
    27
andreas@392
    28
+ (NSString *)loadResourceByName:(NSString *)name;
andreas@392
    29
andreas@391
    30
+ (NSString *)loadStringFromFileName:(NSString *)fileName;
andreas@391
    31
andreas@391
    32
+ (NSDictionary *)unarchiveDictionary:(NSString *)fileName;
andreas@391
    33
dirk@579
    34
+ (void)migrateUnarchivedMessageDictionary:(NSMutableDictionary *)message;
dirk@579
    35
andreas@391
    36
+ (PEPMessage * _Nonnull) mailFrom:(PEPIdentity * _Nullable) fromIdent
andreas@391
    37
                           toIdent: (PEPIdentity * _Nullable) toIdent
andreas@391
    38
                      shortMessage:(NSString *)shortMessage
andreas@391
    39
                       longMessage: (NSString *)longMessage
andreas@391
    40
                          outgoing:(BOOL) outgoing;
andreas@391
    41
dirk@470
    42
+ (void)cleanUp;
andreas@391
    43
andreas@391
    44
+ (NSArray *)pEpWorkFiles;
andreas@391
    45
andreas@391
    46
@end
andreas@391
    47
andreas@391
    48
NS_ASSUME_NONNULL_END