summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleConfigurationSpec.m
diff options
context:
space:
mode:
authorJoel Fischer <joeljfischer@gmail.com>2016-07-01 09:33:59 -0400
committerJoel Fischer <joeljfischer@gmail.com>2016-07-01 09:33:59 -0400
commit4bb10a9955f41067f36bd97ffeeb29301301761c (patch)
tree7934e509e603b3f58026630ad2ce7f6e6741f23c /SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleConfigurationSpec.m
parent7bd9eb256c0dcd3e8789b9831ffb52842cfc0747 (diff)
downloadsdl_ios-4bb10a9955f41067f36bd97ffeeb29301301761c.tar.gz
SDLLifecycleConfiguration remove unneeded initializer
* Add SDLLifecycleConfiguration documentation * Fix a test being focussed * Start on SDLLifecycleConfiguration tests
Diffstat (limited to 'SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleConfigurationSpec.m')
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleConfigurationSpec.m34
1 files changed, 34 insertions, 0 deletions
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleConfigurationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleConfigurationSpec.m
index 37e656a08..3e889de93 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleConfigurationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleConfigurationSpec.m
@@ -1,6 +1,40 @@
#import <Quick/Quick.h>
#import <Nimble/Nimble.h>
+#import "SDLAppHMIType.h"
+#import "SDLLanguage.h"
+#import "SDLLifecycleConfiguration.h"
+
QuickSpecBegin(SDLLifecycleConfigurationSpec)
+describe(@"a lifecycle configuration", ^{
+ __block SDLLifecycleConfiguration *testConfig = nil;
+
+ context(@"that is created with default settings", ^{
+ __block NSString *someAppName = nil;
+ __block NSString *someAppId = nil;
+
+ beforeEach(^{
+ someAppName = @"An App Name";
+ someAppId = @"00542596432764329684352896423679";
+
+ testConfig = [SDLLifecycleConfiguration defaultConfigurationWithAppName:someAppName appId:someAppId];
+ });
+
+ it(@"should have properly set properties", ^{
+ expect(testConfig.appName).to(match(someAppName));
+ expect(testConfig.appId).to(match(someAppId));
+ expect(@(testConfig.tcpDebugMode)).to(beFalsy());
+ expect(testConfig.tcpDebugIPAddress).to(match(@"192.168.0.1"));
+ expect(testConfig.tcpDebugPort).to(match(@"12345"));
+ expect(@([testConfig.appType isEqualToEnum:[SDLAppHMIType DEFAULT]])).to(equal(@YES));
+ expect(@([testConfig.language isEqualToEnum:[SDLLanguage EN_US]])).to(equal(@YES));
+ expect(@([[testConfig.languagesSupported firstObject] isEqualToEnum:[SDLLanguage EN_US]])).to(equal(@YES));
+ expect(testConfig.shortAppName).to(beNil());
+ expect(testConfig.ttsName).to(beNil());
+ expect(testConfig.voiceRecognitionSynonyms).to(beEmpty());
+ });
+ });
+});
+
QuickSpecEnd