summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2019-07-10 13:36:16 -0400
committerNicoleYarroch <nicole@livio.io>2019-07-10 13:36:16 -0400
commitb617321a269b53d08517e2af710864b4d284e961 (patch)
treed0916bb69b01543c4b698700503c4b582ab6786b
parent7d44a7480fcc82cbc86239e7d08a8cbd7f002fe6 (diff)
downloadsdl_ios-b617321a269b53d08517e2af710864b4d284e961.tar.gz
Added CloseApplication response test cases
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj4
-rw-r--r--SmartDeviceLink/SDLCloseApplicationResponse.h10
-rw-r--r--SmartDeviceLink/SDLCloseApplicationResponse.m10
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m40
4 files changed, 54 insertions, 10 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 4dcdb741f..1bd7ec439 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -1305,6 +1305,7 @@
8855F9E9220CBA9200A5C897 /* SDLGetFile.h in Headers */ = {isa = PBXBuildFile; fileRef = 8855F9E7220CBA9200A5C897 /* SDLGetFile.h */; settings = {ATTRIBUTES = (Public, ); }; };
8855F9EA220CBA9200A5C897 /* SDLGetFile.m in Sources */ = {isa = PBXBuildFile; fileRef = 8855F9E8220CBA9200A5C897 /* SDLGetFile.m */; };
8855F9EC220CBFB700A5C897 /* SDLGetFileSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8855F9EB220CBFB700A5C897 /* SDLGetFileSpec.m */; };
+ 8863747E22D650DE00D2671F /* SDLCloseApplicationSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8863747D22D650DE00D2671F /* SDLCloseApplicationSpec.m */; };
88665B69220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.h in Headers */ = {isa = PBXBuildFile; fileRef = 88665B67220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.h */; settings = {ATTRIBUTES = (Public, ); }; };
88665B6A220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.m in Sources */ = {isa = PBXBuildFile; fileRef = 88665B68220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.m */; };
88665B6C220B796A00D9DA77 /* SDLPerformAppServiceInteractionResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 88665B6B220B796A00D9DA77 /* SDLPerformAppServiceInteractionResponseSpec.m */; };
@@ -2961,6 +2962,7 @@
8855F9E7220CBA9200A5C897 /* SDLGetFile.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLGetFile.h; sourceTree = "<group>"; };
8855F9E8220CBA9200A5C897 /* SDLGetFile.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetFile.m; sourceTree = "<group>"; };
8855F9EB220CBFB700A5C897 /* SDLGetFileSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLGetFileSpec.m; sourceTree = "<group>"; };
+ 8863747D22D650DE00D2671F /* SDLCloseApplicationSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCloseApplicationSpec.m; sourceTree = "<group>"; };
88665B67220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLPerformAppServiceInteractionResponse.h; sourceTree = "<group>"; };
88665B68220B771A00D9DA77 /* SDLPerformAppServiceInteractionResponse.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLPerformAppServiceInteractionResponse.m; sourceTree = "<group>"; };
88665B6B220B796A00D9DA77 /* SDLPerformAppServiceInteractionResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLPerformAppServiceInteractionResponseSpec.m; sourceTree = "<group>"; };
@@ -3412,6 +3414,7 @@
162E82411A9BDE8A00906325 /* SDLAlertSpec.m */,
1EE8C4551F38788A00FDC2CF /* SDLButtonPressSpec.m */,
162E82421A9BDE8A00906325 /* SDLChangeRegistrationSpec.m */,
+ 8863747D22D650DE00D2671F /* SDLCloseApplicationSpec.m */,
162E82431A9BDE8A00906325 /* SDLCreateInteractionChoiceSetSpec.m */,
162E82441A9BDE8A00906325 /* SDLDeleteCommandSpec.m */,
162E82451A9BDE8A00906325 /* SDLDeleteFileSpec.m */,
@@ -7727,6 +7730,7 @@
162E82FE1A9BDE8B00906325 /* SDLTBTStateSpec.m in Sources */,
5D5DBF0B1D48E5E600D4F914 /* SDLLockScreenViewControllerSnapshotTests.m in Sources */,
5DB1BCD41D243A8E002FFC37 /* SDLListFilesOperationSpec.m in Sources */,
+ 8863747E22D650DE00D2671F /* SDLCloseApplicationSpec.m in Sources */,
162E834B1A9BDE8B00906325 /* SDLAlertManeuverResponseSpec.m in Sources */,
162E833E1A9BDE8B00906325 /* SDLShowSpec.m in Sources */,
5D6035D8202CF5C900A429C9 /* TestRequestProgressResponse.m in Sources */,
diff --git a/SmartDeviceLink/SDLCloseApplicationResponse.h b/SmartDeviceLink/SDLCloseApplicationResponse.h
index 051bbbdc5..5c44b7e77 100644
--- a/SmartDeviceLink/SDLCloseApplicationResponse.h
+++ b/SmartDeviceLink/SDLCloseApplicationResponse.h
@@ -7,7 +7,6 @@
//
#import "SDLRPCResponse.h"
-#import "SDLRPCFunctionNames.h"
NS_ASSUME_NONNULL_BEGIN
@@ -16,15 +15,6 @@ NS_ASSUME_NONNULL_BEGIN
*/
@interface SDLCloseApplicationResponse : SDLRPCResponse
-#pragma clang diagnostic push
-#pragma clang diagnostic ignored "-Wdeprecated-declarations"
-- (instancetype)init {
- if (self = [super initWithName:SDLRPCFunctionNameCloseApplication]) {
- }
- return self;
-}
-#pragma clang diagnostic pop
-
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLink/SDLCloseApplicationResponse.m b/SmartDeviceLink/SDLCloseApplicationResponse.m
index 10e429d51..3c7743177 100644
--- a/SmartDeviceLink/SDLCloseApplicationResponse.m
+++ b/SmartDeviceLink/SDLCloseApplicationResponse.m
@@ -7,11 +7,21 @@
//
#import "SDLCloseApplicationResponse.h"
+#import "SDLRPCFunctionNames.h"
NS_ASSUME_NONNULL_BEGIN
@implementation SDLCloseApplicationResponse
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+- (instancetype)init {
+ if (self = [super initWithName:SDLRPCFunctionNameCloseApplication]) {
+ }
+ return self;
+}
+#pragma clang diagnostic pop
+
@end
NS_ASSUME_NONNULL_END
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m
new file mode 100644
index 000000000..dc25cdeda
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m
@@ -0,0 +1,40 @@
+//
+// SDLCloseApplicationSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Nicole on 7/10/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import "SDLCloseApplication.h"
+#import "SDLRPCFunctionNames.h"
+#import "SDLRPCParameterNames.h"
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+QuickSpecBegin(SDLCloseApplicationSpec)
+
+describe(@"Getter/Setter Tests", ^{
+ it(@"Should set the function name correctly", ^{
+ SDLCloseApplication *testRequest = [[SDLCloseApplication alloc] init];
+ expect(testRequest.name).to(equal(SDLRPCFunctionNameCloseApplication));
+ });
+
+ it(@"Should initialize correctly with a dictionary", ^{
+ NSDictionary *dict = @{SDLRPCParameterNameRequest:@{
+ SDLRPCParameterNameParameters:@{},
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameCloseApplication}};
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ SDLCloseApplication *testRequest = [[SDLCloseApplication alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ expect(testRequest.name).to(equal(SDLRPCFunctionNameCloseApplication));
+ expect(testRequest.parameters).to(beEmpty());
+ });
+
+});
+
+QuickSpecEnd
+