summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNicoleYarroch <nicole@livio.io>2019-07-10 13:48:01 -0400
committerNicoleYarroch <nicole@livio.io>2019-07-10 13:48:01 -0400
commitd6db8f29262d719e525e8cc9ab06745c4b7f7b9b (patch)
tree6d744d0dd5bbdb12bc08dc5b60a160d879103c65
parentb617321a269b53d08517e2af710864b4d284e961 (diff)
downloadsdl_ios-d6db8f29262d719e525e8cc9ab06745c4b7f7b9b.tar.gz
Added CloseApplication test cases
-rw-r--r--SmartDeviceLink-iOS.xcodeproj/project.pbxproj4
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m3
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCloseApplicationResponseSpec.m38
3 files changed, 43 insertions, 2 deletions
diff --git a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
index 1bd7ec439..077bc10b7 100644
--- a/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
+++ b/SmartDeviceLink-iOS.xcodeproj/project.pbxproj
@@ -1272,6 +1272,7 @@
8831FA48220235B000B8FFB7 /* SDLAppServicesCapabilities.h in Headers */ = {isa = PBXBuildFile; fileRef = 8831FA46220235B000B8FFB7 /* SDLAppServicesCapabilities.h */; settings = {ATTRIBUTES = (Public, ); }; };
8831FA49220235B000B8FFB7 /* SDLAppServicesCapabilities.m in Sources */ = {isa = PBXBuildFile; fileRef = 8831FA47220235B000B8FFB7 /* SDLAppServicesCapabilities.m */; };
8831FA4B2202402B00B8FFB7 /* SDLAppServicesCapabilitiesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 8831FA4A2202402B00B8FFB7 /* SDLAppServicesCapabilitiesSpec.m */; };
+ 883581B022D659BE00405C42 /* SDLCloseApplicationResponseSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 883581AF22D659BE00405C42 /* SDLCloseApplicationResponseSpec.m */; };
883C22C8222ED84D00939C4C /* SDLRPCFunctionNames.h in Headers */ = {isa = PBXBuildFile; fileRef = 883C22C6222ED84D00939C4C /* SDLRPCFunctionNames.h */; settings = {ATTRIBUTES = (Public, ); }; };
883C22C9222ED84D00939C4C /* SDLRPCFunctionNames.m in Sources */ = {isa = PBXBuildFile; fileRef = 883C22C7222ED84D00939C4C /* SDLRPCFunctionNames.m */; };
883C22CB222EEF0900939C4C /* SDLRPCFunctionNamesSpec.m in Sources */ = {isa = PBXBuildFile; fileRef = 883C22CA222EEF0900939C4C /* SDLRPCFunctionNamesSpec.m */; };
@@ -2928,6 +2929,7 @@
8831FA46220235B000B8FFB7 /* SDLAppServicesCapabilities.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLAppServicesCapabilities.h; sourceTree = "<group>"; };
8831FA47220235B000B8FFB7 /* SDLAppServicesCapabilities.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAppServicesCapabilities.m; sourceTree = "<group>"; };
8831FA4A2202402B00B8FFB7 /* SDLAppServicesCapabilitiesSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLAppServicesCapabilitiesSpec.m; sourceTree = "<group>"; };
+ 883581AF22D659BE00405C42 /* SDLCloseApplicationResponseSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLCloseApplicationResponseSpec.m; sourceTree = "<group>"; };
883C22C6222ED84D00939C4C /* SDLRPCFunctionNames.h */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.h; path = SDLRPCFunctionNames.h; sourceTree = "<group>"; };
883C22C7222ED84D00939C4C /* SDLRPCFunctionNames.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLRPCFunctionNames.m; sourceTree = "<group>"; };
883C22CA222EEF0900939C4C /* SDLRPCFunctionNamesSpec.m */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.c.objc; path = SDLRPCFunctionNamesSpec.m; sourceTree = "<group>"; };
@@ -3478,6 +3480,7 @@
162E82691A9BDE8A00906325 /* SDLAlertResponseSpec.m */,
1EE8C4571F387ABD00FDC2CF /* SDLButtonPressResponseSpec.m */,
162E826A1A9BDE8A00906325 /* SDLChangeRegistrationResponseSpec.m */,
+ 883581AF22D659BE00405C42 /* SDLCloseApplicationResponseSpec.m */,
162E826B1A9BDE8A00906325 /* SDLCreateInteractionChoiceSetResponseSpec.m */,
162E826C1A9BDE8A00906325 /* SDLDeleteCommandResponseSpec.m */,
162E826D1A9BDE8A00906325 /* SDLDeleteFileResponseSpec.m */,
@@ -7903,6 +7906,7 @@
1EE8C4501F38629200FDC2CF /* SDLRemoteControlCapabilitiesSpec.m in Sources */,
1EAA47662035B8D3000FE74B /* SDLLightControlDataSpec.m in Sources */,
162E82CF1A9BDE8A00906325 /* SDLBitsPerSampleSpec.m in Sources */,
+ 883581B022D659BE00405C42 /* SDLCloseApplicationResponseSpec.m in Sources */,
162E831E1A9BDE8B00906325 /* SDLOnTBTClientStateSpec.m in Sources */,
162E83351A9BDE8B00906325 /* SDLReadDIDSpec.m in Sources */,
5DF40B28208FDA9700DD6FDA /* SDLVoiceCommandManagerSpec.m in Sources */,
diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m
index dc25cdeda..122adcee4 100644
--- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLCloseApplicationSpec.m
@@ -16,7 +16,7 @@
QuickSpecBegin(SDLCloseApplicationSpec)
describe(@"Getter/Setter Tests", ^{
- it(@"Should set the function name correctly", ^{
+ it(@"Should initialize correctly", ^{
SDLCloseApplication *testRequest = [[SDLCloseApplication alloc] init];
expect(testRequest.name).to(equal(SDLRPCFunctionNameCloseApplication));
});
@@ -33,7 +33,6 @@ describe(@"Getter/Setter Tests", ^{
expect(testRequest.name).to(equal(SDLRPCFunctionNameCloseApplication));
expect(testRequest.parameters).to(beEmpty());
});
-
});
QuickSpecEnd
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCloseApplicationResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCloseApplicationResponseSpec.m
new file mode 100644
index 000000000..71b239b0d
--- /dev/null
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLCloseApplicationResponseSpec.m
@@ -0,0 +1,38 @@
+//
+// SDLCloseApplicationResponseSpec.m
+// SmartDeviceLinkTests
+//
+// Created by Nicole on 7/10/19.
+// Copyright © 2019 smartdevicelink. All rights reserved.
+//
+
+#import <Quick/Quick.h>
+#import <Nimble/Nimble.h>
+
+#import "SDLCloseApplicationResponse.h"
+#import "SDLRPCParameterNames.h"
+#import "SDLRPCFunctionNames.h"
+
+QuickSpecBegin(SDLCloseApplicationResponseSpec)
+
+describe(@"Getter/Setter Tests", ^{
+ it(@"Should initialize correctly", ^{
+ SDLCloseApplicationResponse *testResponse = [[SDLCloseApplicationResponse alloc] init];
+ expect(testResponse.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"
+ SDLCloseApplicationResponse *testResponse = [[SDLCloseApplicationResponse alloc] initWithDictionary:dict];
+#pragma clang diagnostic pop
+
+ expect(testResponse.name).to(equal(SDLRPCFunctionNameCloseApplication));
+ expect(testResponse.parameters).to(beEmpty());
+ });
+});
+
+QuickSpecEnd