summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSetAppIconSpec.m
blob: 29c0f14f5f690a5271298f917b77f4144c270485 (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
//
//  SDLSetAppIconSpec.m
//  SmartDeviceLink


#import <Foundation/Foundation.h>

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

#import "SDLSetAppIcon.h"
#import "SDLNames.h"

QuickSpecBegin(SDLSetAppIconSpec)

describe(@"Getter/Setter Tests", ^ {
    it(@"Should set and get correctly", ^ {
        SDLSetAppIcon* testRequest = [[SDLSetAppIcon alloc] init];
        
        testRequest.syncFileName = @"A/File/Name";
        
        expect(testRequest.syncFileName).to(equal(@"A/File/Name"));
    });
    
    it(@"Should get correctly when initialized", ^ {
        NSMutableDictionary<NSString *, id> *dict = [@{SDLNameRequest:
                                                           @{SDLNameParameters:
                                                                 @{SDLNameSyncFileName:@"A/File/Name"},
                                                             SDLNameOperationName:SDLNameSetAppIcon}} mutableCopy];
        SDLSetAppIcon* testRequest = [[SDLSetAppIcon alloc] initWithDictionary:dict];
        
        expect(testRequest.syncFileName).to(equal(@"A/File/Name"));
    });
    
    it(@"Should return nil if not set", ^ {
        SDLSetAppIcon* testRequest = [[SDLSetAppIcon alloc] init];
        
        expect(testRequest.syncFileName).to(beNil());
    });
});

QuickSpecEnd