blob: cbb26be8ba9ebad76f5e5be4288b6726b5a7c9bd (
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
48
49
50
51
|
//
// SDLSetInteriorVehicleDataResponseSpec.m
// SmartDeviceLink-iOS
//
#import <Foundation/Foundation.h>
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
#import "SDLSetInteriorVehicleDataResponse.h"
#import "SDLModuleData.h"
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
QuickSpecBegin(SDLSetInteriorVehicleDataResponseSpec)
describe(@"Getter/Setter Tests", ^ {
__block SDLModuleData* someModuleData = nil;
beforeEach(^{
someModuleData = [[SDLModuleData alloc] init];
});
it(@"Should set and get correctly", ^ {
SDLSetInteriorVehicleDataResponse* testResponse = [[SDLSetInteriorVehicleDataResponse alloc] init];
testResponse.moduleData = someModuleData;
expect(testResponse.moduleData).to(equal(someModuleData));
});
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameResponse:
@{SDLRPCParameterNameParameters:
@{SDLRPCParameterNameModuleData:someModuleData},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameSetInteriorVehicleData}} mutableCopy];
SDLSetInteriorVehicleDataResponse* testResponse = [[SDLSetInteriorVehicleDataResponse alloc] initWithDictionary:dict];
expect(testResponse.moduleData).to(equal(someModuleData));
});
it(@"Should return nil if not set", ^ {
SDLSetInteriorVehicleDataResponse* testResponse = [[SDLSetInteriorVehicleDataResponse alloc] init];
expect(testResponse.moduleData).to(beNil());
});
});
QuickSpecEnd
|