diff options
Diffstat (limited to 'SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTTSChunkSpec.m')
-rw-r--r-- | SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTTSChunkSpec.m | 46 |
1 files changed, 46 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTTSChunkSpec.m b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTTSChunkSpec.m new file mode 100644 index 000000000..78ca915c9 --- /dev/null +++ b/SmartDeviceLinkTests/RPCSpecs/StructSpecs/SDLTTSChunkSpec.m @@ -0,0 +1,46 @@ +// +// SDLTTSChunkSpec.m +// SmartDeviceLink + + +#import <Foundation/Foundation.h> + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLNames.h" +#import "SDLSpeechCapabilities.h" +#import "SDLTTSChunk.h" + + +QuickSpecBegin(SDLTTSChunkSpec) + +describe(@"Getter/Setter Tests", ^ { + it(@"Should set and get correctly", ^ { + SDLTTSChunk* testStruct = [[SDLTTSChunk alloc] init]; + + testStruct.text = @"TEXT"; + testStruct.type = [SDLSpeechCapabilities PRE_RECORDED]; + + expect(testStruct.text).to(equal(@"TEXT")); + expect(testStruct.type).to(equal([SDLSpeechCapabilities PRE_RECORDED])); + }); + + it(@"Should get correctly when initialized", ^ { + NSMutableDictionary* dict = [@{NAMES_text:@"TEXT", + NAMES_type:[SDLSpeechCapabilities PRE_RECORDED]} mutableCopy]; + SDLTTSChunk* testStruct = [[SDLTTSChunk alloc] initWithDictionary:dict]; + + expect(testStruct.text).to(equal(@"TEXT")); + expect(testStruct.type).to(equal([SDLSpeechCapabilities PRE_RECORDED])); + }); + + it(@"Should return nil if not set", ^ { + SDLTTSChunk* testStruct = [[SDLTTSChunk alloc] init]; + + expect(testStruct.text).to(beNil()); + expect(testStruct.type).to(beNil()); + }); +}); + +QuickSpecEnd
\ No newline at end of file |