diff options
author | BrettyWhite <geekman3454@protonmail.com> | 2019-07-18 10:36:40 -0400 |
---|---|---|
committer | BrettyWhite <geekman3454@protonmail.com> | 2019-07-18 10:36:40 -0400 |
commit | f2b2d44e47cd3c45df6a17409cb482480d53e630 (patch) | |
tree | 7387face4cebfd2d5817d840ad485f4271e59f5e | |
parent | ec136f7547974bd4c037f724acfad555dbb48f95 (diff) | |
download | sdl_ios-feature/issue-1260-update-published-app-services.tar.gz |
update per review commentsfeature/issue-1260-update-published-app-services
4 files changed, 12 insertions, 6 deletions
diff --git a/SmartDeviceLink/SDLUnpublishAppService.h b/SmartDeviceLink/SDLUnpublishAppService.h index 1bd7ebf73..56e1f12b7 100644 --- a/SmartDeviceLink/SDLUnpublishAppService.h +++ b/SmartDeviceLink/SDLUnpublishAppService.h @@ -11,17 +11,21 @@ NS_ASSUME_NONNULL_BEGIN /** - * UnpublishAppService being called indicates that SDL has responded to a request to close the application on the module + * Unpublish an existing service published by this application. */ @interface SDLUnpublishAppService : SDLRPCRequest /** * Create an instance of UnpublishAppService with the serviceID that corresponds with the service to be unpublished + * + * @param serviceID The ID of the service to be unpublished. */ - (instancetype)initWithServiceID:(NSString*)serviceID; /** * The ID of the service to be unpublished. + * + * Required, String */ @property (strong, nonatomic) NSString *serviceID; diff --git a/SmartDeviceLink/SDLUnpublishAppService.m b/SmartDeviceLink/SDLUnpublishAppService.m index 9971a8f57..3da728501 100644 --- a/SmartDeviceLink/SDLUnpublishAppService.m +++ b/SmartDeviceLink/SDLUnpublishAppService.m @@ -40,7 +40,8 @@ NS_ASSUME_NONNULL_BEGIN } - (NSString *)serviceID { - return [self.parameters sdl_objectForName:SDLRPCParameterNameServiceID ofClass:NSString.class error:nil]; + NSError *error = nil; + return [self.parameters sdl_objectForName:SDLRPCParameterNameServiceID ofClass:NSString.class error:&error]; } @end diff --git a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnpublishAppServiceSpec.m b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnpublishAppServiceSpec.m index 296e1d09c..fa2c66c22 100644 --- a/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnpublishAppServiceSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/RequestSpecs/SDLUnpublishAppServiceSpec.m @@ -27,10 +27,10 @@ describe(@"Getter/Setter Tests", ^ { }); it(@"Should get correctly when initialized", ^ { - NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameRequest: - @{SDLRPCParameterNameParameters: - @{SDLRPCParameterNameServiceID:@"idToUnpublish"}, - SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnpublishAppService}} mutableCopy]; + NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameRequest: + @{SDLRPCParameterNameParameters: + @{SDLRPCParameterNameServiceID:@"idToUnpublish"}, + SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnpublishAppService}}; #pragma clang diagnostic push #pragma clang diagnostic ignored "-Wdeprecated-declarations" SDLUnpublishAppService* testRequest = [[SDLUnpublishAppService alloc] initWithDictionary:dict]; diff --git a/SmartDeviceLinkTests/SDLRPCFunctionNamesSpec.m b/SmartDeviceLinkTests/SDLRPCFunctionNamesSpec.m index dc28ebf28..d1022ac90 100644 --- a/SmartDeviceLinkTests/SDLRPCFunctionNamesSpec.m +++ b/SmartDeviceLinkTests/SDLRPCFunctionNamesSpec.m @@ -86,6 +86,7 @@ describe(@"Individual Enum Value Tests", ^ { expect(SDLRPCFunctionNameSubscribeWayPoints).to(equal(@"SubscribeWayPoints")); expect(SDLRPCFunctionNameSyncPData).to(equal(@"SyncPData")); expect(SDLRPCFunctionNameSystemRequest).to(equal(@"SystemRequest")); + expect(SDLRPCFunctionNameUnpublishAppService).to(equal(@"UnpublishAppService")); expect(SDLRPCFunctionNameUnregisterAppInterface).to(equal(@"UnregisterAppInterface")); expect(SDLRPCFunctionNameUnsubscribeButton).to(equal(@"UnsubscribeButton")); expect(SDLRPCFunctionNameUnsubscribeVehicleData).to(equal(@"UnsubscribeVehicleData")); |