summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSpeakSpec.m
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-05-25 08:44:23 -0400
committerJoel Fischer <joeljfischer@gmail.com>2016-05-25 08:44:23 -0400
commitfb8e9903a323acaf5fc78819bb3c203567542ab2 (patch)
treee40665103ac7db492e0a40e34cd92f3390defa55 /SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSpeakSpec.m
parentf7540a02262832e34c67b0953dd8a1804a046fea (diff)
downloadsdl_ios-fb8e9903a323acaf5fc78819bb3c203567542ab2.tar.gz
Shift files into root directory
Diffstat (limited to 'SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSpeakSpec.m')
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSpeakSpec.m45
1 files changed, 45 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSpeakSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSpeakSpec.m
new file mode 100644
index 000000000..dd6b6a400
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLSpeakSpec.m
@@ -0,0 +1,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* dict = [@{NAMES_request:
+ @{NAMES_parameters:
+ @{NAMES_ttsChunks:[@[chunk] mutableCopy]},
+ NAMES_operation_name:NAMES_Speak}} 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 \ No newline at end of file