blob: e336b0067167053014431f5449487269111547f5 (
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
|
//
// SDLSpeakSpec.m
// SmartDeviceLink
#import <Foundation/Foundation.h>
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
#import "SDLSpeak.h"
#import "SDLTTSChunk.h"
#import "SDLNames.h"
QuickSpecBegin(SDLSpeakSpec)
SDLTTSChunk* chunk = [[SDLTTSChunk alloc] init];
describe(@"Getter/Setter Tests", ^ {
it(@"Should set and get correctly", ^ {
SDLSpeak* testRequest = [[SDLSpeak alloc] init];
testRequest.ttsChunks = [@[chunk] mutableCopy];
expect(testRequest.ttsChunks).to(equal([@[chunk] mutableCopy]));
});
it(@"Should get correctly when initialized", ^ {
NSMutableDictionary<NSString *, id> *dict = [@{SDLNameRequest:
@{SDLNameParameters:
@{SDLNameTTSChunks:[@[chunk] mutableCopy]},
SDLNameOperationName:SDLNameSpeak}} mutableCopy];
SDLSpeak* testRequest = [[SDLSpeak alloc] initWithDictionary:dict];
expect(testRequest.ttsChunks).to(equal([@[chunk] mutableCopy]));
});
it(@"Should return nil if not set", ^ {
SDLSpeak* testRequest = [[SDLSpeak alloc] init];
expect(testRequest.ttsChunks).to(beNil());
});
});
QuickSpecEnd
|