Signal-iOS/SignalServiceKit/tests/TestSupport/Fakes/OWSUnitTestEnvironment.m
Michael Kirk 40b99a15ed Fix up some tests
Included plausible test implementation for an in-memory profile manager.

Note two tests remain failing (they've been failing for a while)

// FREEBIE
2017-08-09 12:17:03 -04:00

36 lines
952 B
Objective-C

//
// Copyright (c) 2017 Open Whisper Systems. All rights reserved.
//
#import "OWSUnitTestEnvironment.h"
#import "OWSFakeCallMessageHandler.h"
#import "OWSFakeContactsManager.h"
#import "OWSFakeMessageSender.h"
#import "OWSFakeNotificationsManager.h"
#import "OWSFakeProfileManager.h"
NS_ASSUME_NONNULL_BEGIN
@implementation OWSUnitTestEnvironment
+ (void)ensureSetup
{
static dispatch_once_t onceToken;
dispatch_once(&onceToken, ^{
[self setSharedEnv:[[self alloc] initDefault]];
});
}
- (instancetype)initDefault
{
return [super initWithCallMessageHandler:[OWSFakeCallMessageHandler new]
contactsManager:[OWSFakeContactsManager new]
messageSender:[OWSFakeMessageSender new]
notificationsManager:[OWSFakeNotificationsManager new]
profileManager:[OWSFakeProfileManager new]];
}
@end
NS_ASSUME_NONNULL_END