mirror of https://github.com/oxen-io/session-ios
				
				
				
			
			You cannot select more than 25 topics
			Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
		
		
		
		
		
			
		
			
				
	
	
		
			34 lines
		
	
	
		
			845 B
		
	
	
	
		
			Objective-C
		
	
			
		
		
	
	
			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
 |