summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/SDLEncryptionConfigurationSpec.m
blob: 84904e8add8d2145e92d78ee95279fde9e9a9311 (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
46
47
//
//  SDLEncryptionConfigurationSpec.m
//  SmartDeviceLinkTests
//
//  Created by standa1 on 7/17/19.
//  Copyright © 2019 smartdevicelink. All rights reserved.
//

#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
#import <VideoToolbox/VideoToolbox.h>

#import "SDLEncryptionConfiguration.h"

#import "SDLFakeSecurityManager.h"

QuickSpecBegin(SDLEncryptionConfigurationSpec)

describe(@"a streaming media configuration", ^{
    __block SDLEncryptionConfiguration *testConfig = nil;
    
    context(@"That is created with a full initializer", ^{
        __block SDLFakeSecurityManager *testFakeSecurityManager = nil;
        
        beforeEach(^{
            testFakeSecurityManager = [[SDLFakeSecurityManager alloc] init];
            
            testConfig = [[SDLEncryptionConfiguration alloc] initWithSecurityManagers:@[testFakeSecurityManager.class] delegate:nil];
        });
        
        it(@"should have properly set properties", ^{
            expect(testConfig.securityManagers).to(contain(testFakeSecurityManager.class));
        });
    });
    
    context(@"That is created with init", ^{
        beforeEach(^{
            testConfig = [[SDLEncryptionConfiguration alloc] init];
        });
        
        it(@"should have all properties nil", ^{
            expect(testConfig.securityManagers).to(beNil());
        });
    });
});

QuickSpecEnd