Swiftgram/submodules/HockeySDK-iOS/Support/HockeySDKTests/BITTestsDependencyInjection.m
Peter 76e5a7fab6 Add 'submodules/HockeySDK-iOS/' from commit 'c7d0c7026303253e2ac576c02655691e5d314fe2'
git-subtree-dir: submodules/HockeySDK-iOS
git-subtree-mainline: 085acd26c4432939403765234266e3c1be0f3dd9
git-subtree-split: c7d0c7026303253e2ac576c02655691e5d314fe2
2019-06-11 18:53:14 +01:00

30 lines
654 B
Objective-C

#import "BITTestsDependencyInjection.h"
#import <OCMock/OCMock.h>
static id testNotificationCenter;
static id mockCenter;
@implementation BITTestsDependencyInjection
- (void)setUp {
[self setMockNotificationCenter:OCMPartialMock([NSNotificationCenter new])];
}
- (void)tearDown {
[super tearDown];
}
# pragma mark - Helper
- (void)setMockNotificationCenter:(id)mockNotificationCenter {
mockCenter = OCMClassMock([NSNotificationCenter class]);
OCMStub([mockCenter defaultCenter]).andReturn(mockNotificationCenter);
testNotificationCenter = mockNotificationCenter;
}
- (id)mockNotificationCenter {
return testNotificationCenter;
}
@end