summaryrefslogtreecommitdiff
path: root/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
diff options
context:
space:
mode:
Diffstat (limited to 'SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m')
-rw-r--r--SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m76
1 files changed, 66 insertions, 10 deletions
diff --git a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
index 3f6302e4b..a0bd1bf11 100644
--- a/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
+++ b/SmartDeviceLinkTests/RPCSpecs/ResponseSpecs/SDLUnsubscribeVehicleDataResponseSpec.m
@@ -19,15 +19,18 @@ QuickSpecBegin(SDLUnsubscribeVehicleDataResponseSpec)
SDLVehicleDataResult* vehicleDataResult = [[SDLVehicleDataResult alloc] init];
SDLVehicleDataResult* customOEMvehicleDataResult = [[SDLVehicleDataResult alloc] initWithCustomOEMDataType:@"customOEMVehicleData" resultCode:SDLVehicleDataResultCodeSuccess];
-describe(@"Getter/Setter Tests", ^ {
- it(@"Should set and get correctly", ^ {
+describe(@"getter/setter tests", ^ {
+ it(@"should set and get correctly", ^ {
SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] init];
testResponse.gps = vehicleDataResult;
testResponse.speed = vehicleDataResult;
testResponse.rpm = vehicleDataResult;
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
testResponse.fuelLevel = vehicleDataResult;
testResponse.fuelLevel_State = vehicleDataResult;
+#pragma clang diagnostic pop
testResponse.fuelRange = vehicleDataResult;
testResponse.instantFuelConsumption = vehicleDataResult;
testResponse.externalTemperature = vehicleDataResult;
@@ -52,12 +55,16 @@ describe(@"Getter/Setter Tests", ^ {
testResponse.electronicParkBrakeStatus = vehicleDataResult;
testResponse.turnSignal = vehicleDataResult;
testResponse.cloudAppVehicleID = vehicleDataResult;
-
+ testResponse.handsOffSteering = vehicleDataResult;
+
expect(testResponse.gps).to(equal(vehicleDataResult));
expect(testResponse.speed).to(equal(vehicleDataResult));
expect(testResponse.rpm).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
+#pragma clang diagnostic pop
expect(testResponse.fuelRange).to(equal(vehicleDataResult));
expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
@@ -82,10 +89,11 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
expect(testResponse.turnSignal).to(equal(vehicleDataResult));
expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ expect(testResponse.handsOffSteering).to(equal(vehicleDataResult));
});
- it(@"Should get correctly when initialized", ^ {
- NSMutableDictionary<NSString *, id> *dict = [@{SDLRPCParameterNameResponse:
+ it(@"should get correctly when initialized", ^ {
+ NSDictionary<NSString *, id> *dict = @{SDLRPCParameterNameResponse:
@{SDLRPCParameterNameParameters:
@{SDLRPCParameterNameGPS:vehicleDataResult,
SDLRPCParameterNameSpeed:vehicleDataResult,
@@ -115,9 +123,10 @@ describe(@"Getter/Setter Tests", ^ {
SDLRPCParameterNameMyKey:vehicleDataResult,
SDLRPCParameterNameElectronicParkBrakeStatus:vehicleDataResult,
SDLRPCParameterNameTurnSignal:vehicleDataResult,
- SDLRPCParameterNameCloudAppVehicleID:vehicleDataResult
+ SDLRPCParameterNameCloudAppVehicleID:vehicleDataResult,
+ SDLRPCParameterNameHandsOffSteering:vehicleDataResult,
},
- SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnsubscribeVehicleData}} mutableCopy];
+ SDLRPCParameterNameOperationName:SDLRPCFunctionNameUnsubscribeVehicleData}};
#pragma clang diagnostic push
#pragma clang diagnostic ignored "-Wdeprecated-declarations"
SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] initWithDictionary:dict];
@@ -126,8 +135,11 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.gps).to(equal(vehicleDataResult));
expect(testResponse.speed).to(equal(vehicleDataResult));
expect(testResponse.rpm).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testResponse.fuelLevel).to(equal(vehicleDataResult));
expect(testResponse.fuelLevel_State).to(equal(vehicleDataResult));
+#pragma clang diagnostic pop
expect(testResponse.fuelRange).to(equal(vehicleDataResult));
expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
@@ -152,16 +164,20 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
expect(testResponse.turnSignal).to(equal(vehicleDataResult));
expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ expect(testResponse.handsOffSteering).to(equal(vehicleDataResult));
});
- it(@"Should return nil if not set", ^ {
+ it(@"should return nil if not set", ^ {
SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] init];
expect(testResponse.gps).to(beNil());
expect(testResponse.speed).to(beNil());
expect(testResponse.rpm).to(beNil());
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
expect(testResponse.fuelLevel).to(beNil());
expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
expect(testResponse.fuelRange).to(beNil());
expect(testResponse.instantFuelConsumption).to(beNil());
expect(testResponse.externalTemperature).to(beNil());
@@ -186,11 +202,51 @@ describe(@"Getter/Setter Tests", ^ {
expect(testResponse.electronicParkBrakeStatus).to(beNil());
expect(testResponse.turnSignal).to(beNil());
expect(testResponse.cloudAppVehicleID).to(beNil());
+ expect(testResponse.handsOffSteering).to(beNil());
});
- it(@"Should set and get Generic Network Signal Data", ^{
- SDLUnsubscribeVehicleDataResponse *testRequest = [[SDLUnsubscribeVehicleDataResponse alloc] init];
+ context(@"initWithGps:speed:rpm:instantFuelConsumption:fuelRange:externalTemperature:turnSignal:prndl:tirePressure:odometer:beltStatus:bodyInformation:deviceStatus:driverBraking:wiperStatus:headLampStatus:engineTorque:accPedalPosition:steeringWheelAngle:engineOilLife:electronicParkBrakeStatus:cloudAppVehicleID:eCallInfo:airbagStatus:emergencyEvent:clusterModes:myKey:handsOffSteering:", ^{
+ SDLUnsubscribeVehicleDataResponse* testResponse = [[SDLUnsubscribeVehicleDataResponse alloc] initWithGps:vehicleDataResult speed:vehicleDataResult rpm:vehicleDataResult instantFuelConsumption:vehicleDataResult fuelRange:vehicleDataResult externalTemperature:vehicleDataResult turnSignal:vehicleDataResult prndl:vehicleDataResult tirePressure:vehicleDataResult odometer:vehicleDataResult beltStatus:vehicleDataResult bodyInformation:vehicleDataResult deviceStatus:vehicleDataResult driverBraking:vehicleDataResult wiperStatus:vehicleDataResult headLampStatus:vehicleDataResult engineTorque:vehicleDataResult accPedalPosition:vehicleDataResult steeringWheelAngle:vehicleDataResult engineOilLife:vehicleDataResult electronicParkBrakeStatus:vehicleDataResult cloudAppVehicleID:vehicleDataResult eCallInfo:vehicleDataResult airbagStatus:vehicleDataResult emergencyEvent:vehicleDataResult clusterModes:vehicleDataResult myKey:vehicleDataResult handsOffSteering:vehicleDataResult];
+
+ it(@"expect all properties to be set properly", ^{
+ expect(testResponse.gps).to(equal(vehicleDataResult));
+ expect(testResponse.speed).to(equal(vehicleDataResult));
+ expect(testResponse.rpm).to(equal(vehicleDataResult));
+#pragma clang diagnostic push
+#pragma clang diagnostic ignored "-Wdeprecated-declarations"
+ expect(testResponse.fuelLevel).to(beNil());
+ expect(testResponse.fuelLevel_State).to(beNil());
+#pragma clang diagnostic pop
+ expect(testResponse.fuelRange).to(equal(vehicleDataResult));
+ expect(testResponse.instantFuelConsumption).to(equal(vehicleDataResult));
+ expect(testResponse.externalTemperature).to(equal(vehicleDataResult));
+ expect(testResponse.prndl).to(equal(vehicleDataResult));
+ expect(testResponse.tirePressure).to(equal(vehicleDataResult));
+ expect(testResponse.odometer).to(equal(vehicleDataResult));
+ expect(testResponse.beltStatus).to(equal(vehicleDataResult));
+ expect(testResponse.bodyInformation).to(equal(vehicleDataResult));
+ expect(testResponse.deviceStatus).to(equal(vehicleDataResult));
+ expect(testResponse.driverBraking).to(equal(vehicleDataResult));
+ expect(testResponse.wiperStatus).to(equal(vehicleDataResult));
+ expect(testResponse.headLampStatus).to(equal(vehicleDataResult));
+ expect(testResponse.engineOilLife).to(equal(vehicleDataResult));
+ expect(testResponse.engineTorque).to(equal(vehicleDataResult));
+ expect(testResponse.accPedalPosition).to(equal(vehicleDataResult));
+ expect(testResponse.steeringWheelAngle).to(equal(vehicleDataResult));
+ expect(testResponse.eCallInfo).to(equal(vehicleDataResult));
+ expect(testResponse.airbagStatus).to(equal(vehicleDataResult));
+ expect(testResponse.emergencyEvent).to(equal(vehicleDataResult));
+ expect(testResponse.clusterModes).to(equal(vehicleDataResult));
+ expect(testResponse.myKey).to(equal(vehicleDataResult));
+ expect(testResponse.electronicParkBrakeStatus).to(equal(vehicleDataResult));
+ expect(testResponse.turnSignal).to(equal(vehicleDataResult));
+ expect(testResponse.cloudAppVehicleID).to(equal(vehicleDataResult));
+ expect(testResponse.handsOffSteering).to(equal(vehicleDataResult));
+ });
+ });
+ it(@"should set and get OEM Custom Vehicle Data", ^{
+ SDLUnsubscribeVehicleDataResponse *testRequest = [[SDLUnsubscribeVehicleDataResponse alloc] init];
[testRequest setOEMCustomVehicleData:@"customOEMVehicleData" withVehicleDataState:customOEMvehicleDataResult];
expect([testRequest getOEMCustomVehicleData:@"customOEMVehicleData"]).to(equal(customOEMvehicleDataResult));