blob: f0a39c38723fc386b8b748f35647e30fa8893926 (
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
|
//
// SDLOnTBTClientStateSpec.m
// SmartDeviceLink
#import <Foundation/Foundation.h>
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
#import "SDLOnTBTClientState.h"
#import "SDLRPCParameterNames.h"
#import "SDLRPCFunctionNames.h"
#import "SDLTBTState.h"
QuickSpecBegin(SDLOnTBTClientStateSpec)
describe(@"Getter/Setter Tests", ^ {
it(@"Should set and get correctly", ^ {
SDLOnTBTClientState* testNotification = [[SDLOnTBTClientState alloc] init];
testNotification.state = SDLTBTStateETARequest;
expect(testNotification.state).to(equal(SDLTBTStateETARequest));
});
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary* dict = [@{SDLRPCParameterNameNotification:
@{SDLRPCParameterNameParameters:
@{SDLRPCParameterNameState:SDLTBTStateETARequest},
SDLRPCParameterNameOperationName:SDLRPCFunctionNameOnTBTClientState}} mutableCopy];
SDLOnTBTClientState* testNotification = [[SDLOnTBTClientState alloc] initWithDictionary:dict];
expect(testNotification.state).to(equal(SDLTBTStateETARequest));
});
it(@"Should return nil if not set", ^ {
SDLOnTBTClientState* testNotification = [[SDLOnTBTClientState alloc] init];
expect(testNotification.state).to(beNil());
});
});
QuickSpecEnd
|