blob: 7b44c251e78dc4120a3364bbc71802b51b047fdb (
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
|
//
// SDLTurnSpec.m
// SmartDeviceLink
#import <Foundation/Foundation.h>
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
#import "SDLTurn.h"
#import "SDLNames.h"
#import "SDLImage.h"
QuickSpecBegin(SDLTurnSpec)
SDLImage* image = [[SDLImage alloc] init];
describe(@"Getter/Setter Tests", ^ {
it(@"Should set and get correctly", ^ {
SDLTurn* testStruct = [[SDLTurn alloc] init];
testStruct.navigationText = @"NAVTEXT";
testStruct.turnIcon = image;
expect(testStruct.navigationText).to(equal(@"NAVTEXT"));
expect(testStruct.turnIcon).to(equal(image));
});
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary* dict = [@{SDLNameNavigationText:@"NAVTEXT",
SDLNameTurnIcon:image} mutableCopy];
SDLTurn* testStruct = [[SDLTurn alloc] initWithDictionary:dict];
expect(testStruct.navigationText).to(equal(@"NAVTEXT"));
expect(testStruct.turnIcon).to(equal(image));
});
it(@"Should return nil if not set", ^ {
SDLTurn* testStruct = [[SDLTurn alloc] init];
expect(testStruct.navigationText).to(beNil());
expect(testStruct.turnIcon).to(beNil());
});
});
QuickSpecEnd
|