diff options
author | NicoleYarroch <nicole@livio.io> | 2018-10-04 15:01:02 -0400 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2018-10-04 15:01:02 -0400 |
commit | e923f2f12f2ec48ae6ddcc6ef87d5e64494673b2 (patch) | |
tree | 1d8b1f66ab47ad8ee16fb4a8d6a959656402ff9c | |
parent | fe4caedcd8eb57c49c6dad257d3dfdb1f993583f (diff) | |
download | sdl_ios-e923f2f12f2ec48ae6ddcc6ef87d5e64494673b2.tar.gz |
Added the SDLLifecycleConfigurationUpdateSpec back
Signed-off-by: NicoleYarroch <nicole@livio.io>
-rw-r--r-- | SmartDeviceLink-iOS.xcodeproj/project.pbxproj | 4 | ||||
-rw-r--r-- | SmartDeviceLinkTests/SDLLifecycleConfigurationUpdateSpec.m | 77 |
2 files changed, 81 insertions, 0 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj index 5d71a3f1d..7937c15bf 100644 --- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj +++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj @@ -1243,6 +1243,7 @@ 88802FF520853CD500E9EBC6 /* SmartDeviceLinkSwift.framework in Frameworks */ = {isa = PBXBuildFile; fileRef = 88802FEF20853AE600E9EBC6 /* SmartDeviceLinkSwift.framework */; }; 88802FF620853CD500E9EBC6 /* SmartDeviceLinkSwift.framework in Embed Frameworks */ = {isa = PBXBuildFile; fileRef = 88802FEF20853AE600E9EBC6 /* SmartDeviceLinkSwift.framework */; settings = {ATTRIBUTES = (CodeSignOnCopy, RemoveHeadersOnCopy, ); }; }; 8886EB982111F4FA008294A5 /* SDLFileManagerConfigurationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8886EB972111F4FA008294A5 /* SDLFileManagerConfigurationSpec.m */; }; + 88A1CF1E21669AC7001ACC75 /* SDLLifecycleConfigurationUpdateSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A1CF1D21669AC7001ACC75 /* SDLLifecycleConfigurationUpdateSpec.m */; }; 88A795D22106787400056542 /* SDLStaticIconName.h in Headers */ = {isa = PBXBuildFile; fileRef = 88A795D02106787400056542 /* SDLStaticIconName.h */; settings = {ATTRIBUTES = (Public, ); }; }; 88A795D32106787400056542 /* SDLStaticIconName.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A795D12106787400056542 /* SDLStaticIconName.m */; }; 88A795D5210678E000056542 /* SDLStaticIconNameSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88A795D4210678E000056542 /* SDLStaticIconNameSpec.m */; }; @@ -2741,6 +2742,7 @@ 8877F5F01F34AA2D00DC128A /* SDLSendHapticDataResponseSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLSendHapticDataResponseSpec.m; sourceTree = "<group>"; }; 88802FEF20853AE600E9EBC6 /* SmartDeviceLinkSwift.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; includeInIndex = 0; path = SmartDeviceLinkSwift.framework; sourceTree = BUILT_PRODUCTS_DIR; }; 8886EB972111F4FA008294A5 /* SDLFileManagerConfigurationSpec.m */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.c.objc; path = SDLFileManagerConfigurationSpec.m; sourceTree = "<group>"; }; + 88A1CF1D21669AC7001ACC75 /* SDLLifecycleConfigurationUpdateSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLLifecycleConfigurationUpdateSpec.m; sourceTree = "<group>"; }; 88A795D02106787400056542 /* SDLStaticIconName.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLStaticIconName.h; sourceTree = "<group>"; }; 88A795D12106787400056542 /* SDLStaticIconName.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLStaticIconName.m; sourceTree = "<group>"; }; 88A795D4210678E000056542 /* SDLStaticIconNameSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLStaticIconNameSpec.m; sourceTree = "<group>"; }; @@ -3460,6 +3462,7 @@ 5D1654551D3E754F00554D93 /* SDLLifecycleManagerSpec.m */, 5D60DF23202B7A80001EDA01 /* SDLAsynchronousRPCRequestOperationSpec.m */, 5D60DF25202B7A97001EDA01 /* SDLSequentialRPCRequestOperationSpec.m */, + 88A1CF1D21669AC7001ACC75 /* SDLLifecycleConfigurationUpdateSpec.m */, ); name = Lifecycle; sourceTree = "<group>"; @@ -6994,6 +6997,7 @@ 162E83761A9BDE8B00906325 /* SDLChoiceSpec.m in Sources */, 162E83571A9BDE8B00906325 /* SDLGetDTCsResponseSpec.m in Sources */, 5D4346471E6F0BDA00B639C6 /* SDLLogFileModuleSpec.m in Sources */, + 88A1CF1E21669AC7001ACC75 /* SDLLifecycleConfigurationUpdateSpec.m in Sources */, 1EE8C4581F387ABD00FDC2CF /* SDLButtonPressResponseSpec.m in Sources */, 5DA23FF61F2FAA31009C0313 /* SDLControlFramePayloadRPCStartServiceSpec.m in Sources */, 162E83201A9BDE8B00906325 /* SDLOnVehicleDataSpec.m in Sources */, diff --git a/SmartDeviceLinkTests/SDLLifecycleConfigurationUpdateSpec.m b/SmartDeviceLinkTests/SDLLifecycleConfigurationUpdateSpec.m new file mode 100644 index 000000000..fed05bce5 --- /dev/null +++ b/SmartDeviceLinkTests/SDLLifecycleConfigurationUpdateSpec.m @@ -0,0 +1,77 @@ +// +// SDLLifecycleConfigurationUpdateSpec.m +// SmartDeviceLinkTests +// +// Created by Nicole on 7/25/18. +// Copyright © 2018 smartdevicelink. All rights reserved. +// + +#import <Quick/Quick.h> +#import <Nimble/Nimble.h> + +#import "SDLLifecycleConfigurationUpdate.h" +#import "SDLTTSChunk.h" + +QuickSpecBegin(SDLLifecycleConfigurationUpdateSpec) + +describe(@"A lifecycle configuration update", ^{ + __block SDLLifecycleConfigurationUpdate *update = nil; + + describe(@"Created with the default init", ^{ + beforeEach(^{ + update = [[SDLLifecycleConfigurationUpdate alloc] init]; + }); + + it(@"should return nil if not set", ^{ + expect(update.appName).to(beNil()); + expect(update.shortAppName).to(beNil()); + expect(update.ttsName).to(beNil()); + expect(update.voiceRecognitionCommandNames).to(beNil()); + }); + + it(@"should set and get correctly", ^{ + NSString *testAppName = @"Some Test String"; + NSString *testShortAppName = @"Short"; + NSArray<SDLTTSChunk *> *testTTSName = [SDLTTSChunk textChunksFromString:@"Some TTS String"]; + NSArray<NSString *> *testVRCommandNames = @[@"VR Command One", @"VR Command Two"]; + + update.appName = testAppName; + update.shortAppName = testShortAppName; + update.ttsName = testTTSName; + update.voiceRecognitionCommandNames = testVRCommandNames; + + expect(update.appName).to(equal(testAppName)); + expect(update.shortAppName).to(equal(testShortAppName)); + expect(update.ttsName).to(equal(testTTSName)); + expect(update.voiceRecognitionCommandNames).to(equal(testVRCommandNames)); + }); + }); + + describe(@"Created with the default debug initalizer", ^{ + it(@"should have set all properties correctly", ^{ + NSString *testAppName = @"Test App Name"; + NSString *testShortAppName = @"Short"; + NSArray<SDLTTSChunk *> *testTTSName = [SDLTTSChunk textChunksFromString:@"Some TTS String"]; + NSArray<NSString *> *testVRCommandNames = @[@"VR Command One", @"VR Command Two"]; + + update = [[SDLLifecycleConfigurationUpdate alloc] initWithAppName:testAppName shortAppName:testShortAppName ttsName:testTTSName voiceRecognitionCommandNames:testVRCommandNames]; + + expect(update.appName).to(equal(testAppName)); + expect(update.shortAppName).to(equal(testShortAppName)); + expect(update.ttsName).to(equal(testTTSName)); + expect(update.voiceRecognitionCommandNames).to(equal(testVRCommandNames)); + }); + + it(@"should have left all properties as nil if no parameters set", ^{ + update = [[SDLLifecycleConfigurationUpdate alloc] initWithAppName:nil shortAppName:nil ttsName:nil voiceRecognitionCommandNames:nil]; + + expect(update.appName).to(beNil()); + expect(update.shortAppName).to(beNil()); + expect(update.ttsName).to(beNil()); + expect(update.voiceRecognitionCommandNames).to(beNil()); + }); + }); +}); + +QuickSpecEnd + |