diff options
author | NicoleYarroch <nicole@livio.io> | 2019-02-27 11:08:28 -0500 |
---|---|---|
committer | NicoleYarroch <nicole@livio.io> | 2019-02-27 11:08:28 -0500 |
commit | 2104343df335882241c719d710bbd645480b025a (patch) | |
tree | a51c126618f52e0175fa6fd67180098cb2c149ef | |
parent | 18d4d12b8c24a6bf9def5b873049a8b901b9eddf (diff) | |
download | sdl_ios-2104343df335882241c719d710bbd645480b025a.tar.gz |
Added param to UnsubscribeVehicleData response RPC
Added the cloudAppVehicleID param to UnsubscribeVehicleData response RPC
3 files changed, 20 insertions, 0 deletions
diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h index 0500a1921..32f51cf76 100644 --- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h +++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.h @@ -211,6 +211,13 @@ NS_ASSUME_NONNULL_BEGIN */ @property (strong, nonatomic, nullable) SDLVehicleDataResult *turnSignal; +/** + The result of requesting to unsubscribe to the cloud app vehicle id + + Optional + */ +@property (strong, nonatomic, nullable) SDLVehicleDataResult *cloudAppVehicleID; + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m index 6ad213dee..7d14e4f28 100644 --- a/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m +++ b/SmartDeviceLink/SDLUnsubscribeVehicleDataResponse.m @@ -242,6 +242,14 @@ NS_ASSUME_NONNULL_BEGIN return [parameters sdl_objectForName:SDLNameTurnSignal ofClass:SDLVehicleDataResult.class]; } +- (void)setCloudAppVehicleID:(nullable SDLVehicleDataResult *)cloudAppVehicleID { + [parameters sdl_setObject:cloudAppVehicleID forName:SDLNameCloudAppVehicleID]; +} + +- (nullable SDLVehicleDataResult *)cloudAppVehicleID { + return [parameters sdl_objectForName:SDLNameCloudAppVehicleID ofClass:SDLVehicleDataResult.class]; +} + @end NS_ASSUME_NONNULL_END diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m index 8af7ef673..0ebf3d4f4 100644 --- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m +++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m @@ -49,6 +49,7 @@ describe(@"Getter/Setter Tests", ^ { testResponse.myKey = vehicleDataResult; testResponse.electronicParkBrakeStatus = vehicleDataResult; testResponse.turnSignal = vehicleDataResult; + testResponse.cloudAppVehicleID = vehicleDataResult; expect(testResponse.gps).to(equal(vehicleDataResult)); expect(testResponse.speed).to(equal(vehicleDataResult)); @@ -78,6 +79,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testResponse.myKey).to(equal(vehicleDataResult)); expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult)); expect(testResponse.turnSignal).to(equal(vehicleDataResult)); + expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult)); }); it(@"Should get correctly when initialized", ^ { @@ -111,6 +113,7 @@ describe(@"Getter/Setter Tests", ^ { SDLNameMyKey:vehicleDataResult, SDLNameElectronicParkBrakeStatus:vehicleDataResult, SDLNameTurnSignal:vehicleDataResult, + SDLNameCloudAppVehicleID:vehicleDataResult }, SDLNameOperationName:SDLNameUnsubscribeVehicleData}} mutableCopy]; SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] initWithDictionary:dict]; @@ -143,6 +146,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testResponse.myKey).to(equal(vehicleDataResult)); expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult)); expect(testResponse.turnSignal).to(equal(vehicleDataResult)); + expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult)); }); it(@"Should return nil if not set", ^ { @@ -176,6 +180,7 @@ describe(@"Getter/Setter Tests", ^ { expect(testResponse.myKey).to(beNil()); expect(testResponse.electronicParkBrakeStatus).to(beNil()); expect(testResponse.turnSignal).to(beNil()); + expect(testResponse.cloudAppVehicleID).to(beNil()); }); }); |