Signal-iOS/SignalServiceKit/tests/TestSupport/Fakes/OWSUnitTestEnvironment.m
Michael Kirk ccb4a88742 Import SSK (and history) into Signal-iOS
git remote add ssk ../SignalServiceKit
git remote update
git merge -s ours --allow-unrelated-histories --no-commit ssk/master
git read-tree --prefix=SignalServiceKit -u ssk/master
git commit
2017-07-21 13:55:01 -04:00

34 lines
845 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"
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]];
}
@end
NS_ASSUME_NONNULL_END