mirror of
https://github.com/Swiftgram/Telegram-iOS.git
synced 2025-06-16 05:55:20 +00:00

git-subtree-dir: submodules/HockeySDK-iOS git-subtree-mainline: 085acd26c4432939403765234266e3c1be0f3dd9 git-subtree-split: c7d0c7026303253e2ac576c02655691e5d314fe2
30 lines
654 B
Objective-C
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
|