summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilal Alsharifi <bilal.alsharifi@gmail.com>2020-11-02 09:58:32 -0500
committerBilal Alsharifi <bilal.alsharifi@gmail.com>2020-11-02 09:58:32 -0500
commit455ac3d75188d69d1a9aec2b3ce3f9878f18fa2e (patch)
tree862fced1fb4401312c152fe647c057df1eb27f44
parent28b873df0e0f24cbce52172ee4842da2bb7f32a7 (diff)
downloadsdl_android-455ac3d75188d69d1a9aec2b3ce3f9878f18fa2e.tar.gz
Add exceptional cases to fix broken tests in RPCGenericTestsfeature/annotations_spec_match_test
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java12
1 files changed, 12 insertions, 0 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java
index 33873fc4e..178c7a125 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCGenericTests.java
@@ -242,6 +242,10 @@ public class RPCGenericTests {
rpcName = "OasisAddress";
} else if (rpcName.equals("ShowConstantTBT")) {
rpcName = "ShowConstantTbt";
+ } else if (rpcName.equals("messageType")) {
+ rpcName = "MessageType";
+ } else if (rpcName.equals("DisplayCapabilities")) {
+ isDeprecated = false;
} else if (rpcName.equals("EncodedSyncPData") || rpcName.equals("OnEncodedSyncPData") || rpcName.equals("EncodedSyncPDataResponse") || rpcName.equals("FunctionID")) {
skipRPC = true;
}
@@ -304,6 +308,8 @@ public class RPCGenericTests {
paramType = "boolean";
} else if (rpcName.equals("SubscribeVehicleData") && Arrays.asList("setElectronicParkBrakeStatus", "setCloudAppVehicleID").contains(setterMethodName)) {
paramType = "boolean";
+ } else if (rpcName.equals("Show") && setterMethodName.equalsIgnoreCase("setMediaClock")) {
+ isDeprecated = true;
} else if (rpcName.equals("CancelInteraction") && setterMethodName.equals("setFunctionID")) {
setterMethodName = "setInteractionFunctionID";
} else if (rpcName.equals("NavigationCapability") && setterMethodName.equals("setGetWayPointsEnabled")) {
@@ -422,6 +428,12 @@ public class RPCGenericTests {
skipElement = false;
String elementName = myParser.getAttributeValue(null, "name");
+ // -------------- Exceptional cases because of mismatch between the RPC spec and the Android code --------------
+ if (rpcName.equalsIgnoreCase("MessageType")) {
+ elementName = elementName.toUpperCase();
+ }
+ // -------------------------------------------------------------------------------------------------------------
+
Element element = new Element()
.setRPCName(rpcName)
.setName(elementName)