blob: 358e9f816c452e8c5677f82d41b7c3db8f7dbfac (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
|
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
#import "SDLConfiguration.h"
#import "SDLLifecycleConfiguration.h"
#import "SDLLogConfiguration.h"
#import "SDLLockScreenConfiguration.h"
QuickSpecBegin(SDLConfigurationSpec)
describe(@"a configuration", ^{
__block SDLConfiguration *testConfig = nil;
context(@"created with custom configs", ^{
__block SDLLifecycleConfiguration *someLifecycleConfig = nil;
__block SDLLockScreenConfiguration *someLockscreenConfig = nil;
__block SDLLogConfiguration *someLogConfig = nil;
__block NSString *someAppName = nil;
__block NSString *someAppId = nil;
__block UIColor *someBackgroundColor = nil;
__block UIImage *someImage = nil;
beforeEach(^{
someAppName = @"some name";
someAppId = @"some id";
someBackgroundColor = [UIColor blueColor];
someImage = [UIImage imageNamed:@"testImagePNG" inBundle:[NSBundle bundleForClass:[self class]] compatibleWithTraitCollection:nil];
someLifecycleConfig = [SDLLifecycleConfiguration defaultConfigurationWithAppName:someAppName appId:someAppId];
someLockscreenConfig = [SDLLockScreenConfiguration enabledConfigurationWithAppIcon:someImage backgroundColor:someBackgroundColor];
someLogConfig = [SDLLogConfiguration defaultConfiguration];
testConfig = [SDLConfiguration configurationWithLifecycle:someLifecycleConfig lockScreen:someLockscreenConfig logging:someLogConfig];
});
it(@"should contain the correct configs", ^{
expect(testConfig.lifecycleConfig).to(equal(someLifecycleConfig));
expect(testConfig.lockScreenConfig).to(equal(someLockscreenConfig));
expect(testConfig.loggingConfig).to(equal(someLogConfig));
});
});
});
QuickSpecEnd
|