summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--SmartDeviceLink/SDLLifecycleConfiguration.h10
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLLifecycleConfigurationSpec.m34
-rw-r--r--SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m2
3 files changed, 43 insertions, 3 deletions
diff --git a/SmartDeviceLink/SDLLifecycleConfiguration.h b/SmartDeviceLink/SDLLifecycleConfiguration.h
index e6f700e23..70e6b424a 100644
--- a/SmartDeviceLink/SDLLifecycleConfiguration.h
+++ b/SmartDeviceLink/SDLLifecycleConfiguration.h
@@ -23,9 +23,15 @@ NS_ASSUME_NONNULL_BEGIN
@interface SDLLifecycleConfiguration : NSObject <NSCopying>
- (instancetype)init NS_UNAVAILABLE;
-- (instancetype)initDefaultConfigurationWithAppName:(NSString *)appName appId:(NSString *)appId NS_DESIGNATED_INITIALIZER;
-// TODO: Need documentation
+/**
+ * A production configuration that runs using IAP. Additional functionality should be customized on the properties.
+ *
+ * @param appName The name of the app.
+ * @param appId The appId to be used. This should be registered with the radio's manufacturer.
+ *
+ * @return The lifecycle configuration
+ */
+ (SDLLifecycleConfiguration *)defaultConfigurationWithAppName:(NSString *)appName appId:(NSString *)appId;
+ (SDLLifecycleConfiguration *)debugConfigurationWithAppName:(NSString *)appName appId:(NSString *)appId ipAddress:(NSString *)ipAddress port:(NSString *)port;
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
diff --git a/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m b/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m
index 5bd7ca2ae..e716a2fdc 100644
--- a/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m
+++ b/SmartDeviceLinkTests/DevAPISpecs/SDLLockScreenConfigurationSpec.m
@@ -5,7 +5,7 @@
QuickSpecBegin(SDLLockScreenConfigurationSpec)
-fdescribe(@"a lock screen configuration", ^{
+describe(@"a lock screen configuration", ^{
__block SDLLockScreenConfiguration *testConfig = nil;
context(@"in the disabled configuration", ^{