blob: 45946f405d1da93076aed39bb7c859f48442badd (
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
|
// SDLGetWaypointsSpec.m
//
#import <Foundation/Foundation.h>
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
#import "SDLGetWaypoints.h"
#import "SDLNames.h"
#import "SDLWayPointType.h"
QuickSpecBegin(SDLGetWaypointsSpec)
describe(@"Getter/Setter Tests", ^ {
it(@"Should set and get correctly", ^ {
SDLGetWayPoints* testRequest = [[SDLGetWayPoints alloc] init];
testRequest.waypointType = SDLWayPointTypeAll;
expect(testRequest.waypointType).to(equal(SDLWayPointTypeAll));
});
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary* dict = [@{SDLNameRequest:
@{SDLNameParameters:
@{SDLNameWayPointType:SDLWayPointTypeAll},
SDLNameOperationName:SDLNameGetWayPoints}} mutableCopy];
SDLGetWayPoints* testRequest = [[SDLGetWayPoints alloc] initWithDictionary:dict];
expect(testRequest.waypointType).to(equal(SDLWayPointTypeAll));
});
it(@"Should return nil if not set", ^ {
SDLGetWayPoints* testRequest = [[SDLGetWayPoints alloc] init];
expect(testRequest.waypointType).to(beNil());
});
});
QuickSpecEnd
|