summaryrefslogtreecommitdiff
path: root/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses
diff options
context:
space:
mode:
authorRHenigan <heniganr1@gmail.com>2020-08-13 14:24:20 -0400
committerRHenigan <heniganr1@gmail.com>2020-08-13 14:24:20 -0400
commit292fe6005a1e863be1c5e6829574a3b89ba126ac (patch)
tree90e2a9ac369f7d79b143c72eef6fb1114a298b9a /android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses
parenta52d89561a7d8d144d376c0261c57066f99546b2 (diff)
parent25a849c9c1e852c24356f569f8877e7bf5193f0b (diff)
downloadsdl_android-292fe6005a1e863be1c5e6829574a3b89ba126ac.tar.gz
Merge branch 'develop' into feature/0268_MainMenuUpdating_Pagination
Diffstat (limited to 'android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses')
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ButtonPressResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CancelInteractionResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CloseApplicationResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateWindowResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteWindowResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DialNumberResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetAppServiceDataResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetFileResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataConsentResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetSystemCapabilityResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java57
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetWayPointsResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAppServiceInteractionResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PublishAppServiceResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReleaseInteriorVehicleDataModuleResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetInteriorVehicleDataResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowAppMenuResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java24
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeWaypointsResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnpublishAppServiceResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java24
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeWayPointsResponseTests.java4
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java4
58 files changed, 203 insertions, 122 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java
index 94346fdb2..e4d69e79f 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddCommandResponseTests.java
@@ -15,7 +15,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -61,7 +61,7 @@ public class AddCommandResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java
index ec355539d..861de0d37 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AddSubmenuResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class AddSubmenuResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java
index f26a09f4a..01805fce6 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class AlertManeuverResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java
index ff260f23f..d8f554c53 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertResponseTests.java
@@ -19,7 +19,7 @@ import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
* This is a unit test class for the SmartDeviceLink library project class :
@@ -83,7 +83,7 @@ public class AlertResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ButtonPressResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ButtonPressResponseTest.java
index 25b8140c4..2c4bfc651 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ButtonPressResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ButtonPressResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class ButtonPressResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CancelInteractionResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CancelInteractionResponseTests.java
index e1fb2746a..a981719e9 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CancelInteractionResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CancelInteractionResponseTests.java
@@ -48,7 +48,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -94,7 +94,7 @@ public class CancelInteractionResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java
index 60996445c..6888c589d 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ChangeRegistrationResponseTests.java
@@ -17,7 +17,7 @@ import java.util.Hashtable;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
* This is a unit test class for the SmartDeviceLink library project class :
@@ -61,7 +61,7 @@ public class ChangeRegistrationResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CloseApplicationResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CloseApplicationResponseTests.java
index 9bf867391..6eb9a09a5 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CloseApplicationResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CloseApplicationResponseTests.java
@@ -48,7 +48,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -94,7 +94,7 @@ public class CloseApplicationResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateWindowResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateWindowResponseTest.java
index 56e8fc257..a06af985b 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateWindowResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateWindowResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class CreateWindowResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor() {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java
index 2318a4e46..b2e6e27a9 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class DeleteCommandResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java
index d5ca5d0c1..0e529dc69 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteFileResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
@@ -82,7 +82,7 @@ public class DeleteFileResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java
index 7a313531c..24ce266d1 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteInteractionChoiceSetResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class DeleteInteractionChoiceSetResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java
index e70402ecd..8392f915b 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteSubMenuResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class DeleteSubMenuResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteWindowResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteWindowResponseTest.java
index bfa2df5aa..347db5ea6 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteWindowResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteWindowResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class DeleteWindowResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor() {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java
index d42a1e53e..7bfefbeea 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java
@@ -16,7 +16,7 @@ import org.junit.Test;
import java.util.Hashtable;
import java.util.List;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
@@ -91,7 +91,7 @@ public class DiagnosticMessageResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DialNumberResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DialNumberResponseTests.java
index 9625cf3d5..ff23c5ad7 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DialNumberResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DialNumberResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class DialNumberResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java
index 9d999e1b7..f68a6837b 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/EndAudioPassThruResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class EndAudioPassThruResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetAppServiceDataResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetAppServiceDataResponseTests.java
index 243c9ab3b..3e1d1f136 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetAppServiceDataResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetAppServiceDataResponseTests.java
@@ -15,7 +15,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -66,7 +66,7 @@ public class GetAppServiceDataResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java
index 464efa60c..ea4d48790 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetDTCsResponseTests.java
@@ -22,7 +22,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
* This is a unit test class for the SmartDeviceLink library project class :
@@ -90,7 +90,7 @@ public class GetDTCsResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetFileResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetFileResponseTests.java
index 6b62d3200..a4abf011d 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetFileResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetFileResponseTests.java
@@ -20,7 +20,7 @@ import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
@@ -101,7 +101,7 @@ public class GetFileResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataConsentResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataConsentResponseTests.java
index 48cea8f69..411691bd0 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataConsentResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataConsentResponseTests.java
@@ -16,7 +16,7 @@ import org.junit.Test;
import java.util.Hashtable;
import java.util.List;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertTrue;
@@ -68,7 +68,7 @@ public class GetInteriorVehicleDataConsentResponseTests extends BaseRpcTests {
@Test
public void testJsonConstructor() {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataResponseTests.java
index fd3e793f5..80185c05c 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataResponseTests.java
@@ -16,7 +16,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
@@ -91,7 +91,7 @@ public class GetInteriorVehicleDataResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetSystemCapabilityResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetSystemCapabilityResponseTests.java
index 80a0a8b8d..ee2b24d1f 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetSystemCapabilityResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetSystemCapabilityResponseTests.java
@@ -20,7 +20,7 @@ import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
public class GetSystemCapabilityResponseTests extends BaseRpcTests {
@@ -80,7 +80,7 @@ public class GetSystemCapabilityResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
index d09494913..001bf54f2 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetVehicleDataResponseTests.java
@@ -17,6 +17,7 @@ import com.smartdevicelink.proxy.rpc.HeadLampStatus;
import com.smartdevicelink.proxy.rpc.MyKey;
import com.smartdevicelink.proxy.rpc.SingleTireStatus;
import com.smartdevicelink.proxy.rpc.TireStatus;
+import com.smartdevicelink.proxy.rpc.WindowStatus;
import com.smartdevicelink.proxy.rpc.enums.TurnSignal;
import com.smartdevicelink.test.BaseRpcTests;
import com.smartdevicelink.test.JsonUtils;
@@ -40,7 +41,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
@@ -98,6 +99,8 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
result.put(GetVehicleDataResponse.KEY_FUEL_RANGE, VehicleDataHelper.JSON_FUEL_RANGE);
result.put(GetVehicleDataResponse.KEY_TURN_SIGNAL, VehicleDataHelper.TURN_SIGNAL);
result.put(GetVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS, VehicleDataHelper.ELECTRONIC_PARK_BRAKE_STATUS);
+ result.put(GetVehicleDataResponse.KEY_WINDOW_STATUS, VehicleDataHelper.WINDOW_STATUS_LIST);
+ result.put(GetVehicleDataResponse.KEY_HANDS_OFF_STEERING, VehicleDataHelper.HANDS_OFF_STEERING);
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, VehicleDataHelper.OEM_CUSTOM_VEHICLE_DATA_STATE);
} catch(JSONException e){
fail(TestValues.JSON_FAIL);
@@ -123,8 +126,10 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
JSONObject clusterModeStatusObj = new JSONObject();
JSONObject myKeyObj = new JSONObject();
JSONObject fuelRangeObj = new JSONObject();
+ JSONObject windowStatusObj = new JSONObject();
JSONArray fuelRangeArrayObj = new JSONArray();
-
+ JSONArray windowStatusArrayObj = new JSONArray();
+
try {
//set up the JSONObject to represent GetVehicleDataResponse
//TIRE_PRESSURE
@@ -249,6 +254,11 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
fuelRangeObj.put(FuelRange.KEY_RANGE, VehicleDataHelper.FUEL_RANGE_RANGE);
fuelRangeArrayObj.put(fuelRangeObj);
+ // WINDOW_STATUS
+ windowStatusObj.put(WindowStatus.KEY_LOCATION, VehicleDataHelper.LOCATION_GRID);
+ windowStatusObj.put(WindowStatus.KEY_STATE, VehicleDataHelper.WINDOW_STATE);
+ windowStatusArrayObj.put(windowStatusObj);
+
reference.put(GetVehicleDataResponse.KEY_SPEED, VehicleDataHelper.SPEED);
reference.put(GetVehicleDataResponse.KEY_RPM, VehicleDataHelper.RPM);
reference.put(GetVehicleDataResponse.KEY_EXTERNAL_TEMPERATURE, VehicleDataHelper.EXTERNAL_TEMPERATURE);
@@ -278,8 +288,10 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
reference.put(GetVehicleDataResponse.KEY_FUEL_RANGE, fuelRangeArrayObj);
reference.put(GetVehicleDataResponse.KEY_TURN_SIGNAL, TurnSignal.OFF);
reference.put(GetVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS, VehicleDataHelper.ELECTRONIC_PARK_BRAKE_STATUS);
+ reference.put(GetVehicleDataResponse.KEY_WINDOW_STATUS, windowStatusArrayObj);
+ reference.put(GetVehicleDataResponse.KEY_HANDS_OFF_STEERING, VehicleDataHelper.HANDS_OFF_STEERING);
reference.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, VehicleDataHelper.OEM_CUSTOM_VEHICLE_DATA_STATE);
-
+
JSONObject underTest = msg.serializeJSON();
//go inside underTest and only return the JSONObject inside the parameters key inside the response key
@@ -416,6 +428,26 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
fuelRangeRefereceList,
fuelRangeUnderTestList));
}
+ else if (key.equals(GetVehicleDataResponse.KEY_WINDOW_STATUS)) {
+ JSONArray windowStatusArrayObjReference = JsonUtils.readJsonArrayFromJsonObject(reference, key);
+ List<WindowStatus> windowStatusReferenceList = new ArrayList<>();
+ for (int index = 0; index < windowStatusArrayObjReference.length(); index++) {
+ WindowStatus windowStatus = new WindowStatus(JsonRPCMarshaller.deserializeJSONObject( (JSONObject)windowStatusArrayObjReference.get(index) ));
+ windowStatusReferenceList.add(windowStatus);
+ }
+
+ JSONArray windowStatusArrayObjTest = JsonUtils.readJsonArrayFromJsonObject(underTest, key);
+ List<WindowStatus> windowStatusUnderTestList = new ArrayList<>();
+ for (int index = 0; index < windowStatusArrayObjTest.length(); index++) {
+ WindowStatus windowStatus = new WindowStatus(JsonRPCMarshaller.deserializeJSONObject( (JSONObject)windowStatusArrayObjTest.get(index) ));
+ windowStatusUnderTestList.add(windowStatus);
+ }
+
+ assertTrue("JSON value didn't match expected value for key \"" + key + "\".",
+ Validator.validateWindowStatuses(
+ windowStatusReferenceList,
+ windowStatusUnderTestList));
+ }
else {
assertEquals("JSON value didn't match expected value for key \"" + key + "\".",
JsonUtils.readObjectFromJsonObject(reference, key),
@@ -433,7 +465,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
* Tests the expected values of the RPC message.
*/
@Test
- public void testRpcValues(){
+ public void testRpcValues(){
// Valid Tests
assertEquals(TestValues.MATCH, VehicleDataHelper.SPEED, ( (GetVehicleDataResponse) msg ).getSpeed());
assertEquals(TestValues.MATCH, (Integer) VehicleDataHelper.RPM, ( (GetVehicleDataResponse) msg ).getRpm());
@@ -462,6 +494,8 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
assertEquals(TestValues.MATCH, VehicleDataHelper.MY_KEY, ( (GetVehicleDataResponse) msg ).getMyKey());
assertEquals(TestValues.MATCH, VehicleDataHelper.TURN_SIGNAL, ( (GetVehicleDataResponse) msg ).getTurnSignal());
assertEquals(TestValues.MATCH, VehicleDataHelper.ELECTRONIC_PARK_BRAKE_STATUS, ( (GetVehicleDataResponse) msg ).getElectronicParkBrakeStatus());
+ assertEquals(TestValues.MATCH, VehicleDataHelper.WINDOW_STATUS_LIST, ( (GetVehicleDataResponse) msg ).getWindowStatus());
+ assertEquals(TestValues.MATCH, VehicleDataHelper.HANDS_OFF_STEERING, ( (GetVehicleDataResponse) msg ).getHandsOffSteering());
assertEquals(TestValues.MATCH, VehicleDataHelper.OEM_CUSTOM_VEHICLE_DATA_STATE, ( (GetVehicleDataResponse) msg ).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
// Invalid/Null Tests
@@ -496,6 +530,8 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
assertNull(TestValues.NULL, msg.getMyKey());
assertNull(TestValues.NULL, msg.getTurnSignal());
assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus());
+ assertNull(TestValues.NULL, msg.getHandsOffSteering());
+ assertNull(TestValues.NULL, msg.getWindowStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
@@ -505,7 +541,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
@@ -526,7 +562,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
assertEquals(TestValues.MATCH, JsonUtils.readDoubleFromJsonObject(parameters, GetVehicleDataResponse.KEY_FUEL_LEVEL), cmd.getFuelLevel());
assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, GetVehicleDataResponse.KEY_VIN), cmd.getVin());
assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, GetVehicleDataResponse.KEY_PRNDL), cmd.getPrndl().toString());
-
+ assertEquals(TestValues.MATCH, JsonUtils.readBooleanFromJsonObject(parameters, GetVehicleDataResponse.KEY_HANDS_OFF_STEERING), cmd.getHandsOffSteering());
JSONObject tireStatusObj = JsonUtils.readJsonObjectFromJsonObject(parameters, GetVehicleDataResponse.KEY_TIRE_PRESSURE);
TireStatus tireStatus = new TireStatus(JsonRPCMarshaller.deserializeJSONObject(tireStatusObj));
assertTrue(TestValues.TRUE, Validator.validateTireStatus(tireStatus, cmd.getTirePressure()) );
@@ -584,6 +620,15 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{
MyKey myKey = new MyKey(JsonRPCMarshaller.deserializeJSONObject(myKeyObj));
assertTrue(TestValues.TRUE, Validator.validateMyKey(myKey, cmd.getMyKey()) );
+ JSONArray windowStatusArray = JsonUtils.readJsonArrayFromJsonObject(parameters, GetVehicleDataResponse.KEY_WINDOW_STATUS);
+
+ List<WindowStatus> windowStatus = new ArrayList<>();
+ for (int index = 0; index < windowStatusArray.length(); index++) {
+ WindowStatus status = new WindowStatus(JsonRPCMarshaller.deserializeJSONObject( (JSONObject)windowStatusArray.get(index)) );
+ windowStatus.add(status);
+ }
+ assertTrue(TestValues.TRUE, Validator.validateWindowStatuses(windowStatus, cmd.getWindowStatus()) );
+
assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, GetVehicleDataResponse.KEY_TURN_SIGNAL), cmd.getTurnSignal().toString());
assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, GetVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS), cmd.getElectronicParkBrakeStatus().toString());
assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME), cmd.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetWayPointsResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetWayPointsResponseTests.java
index f133e2bed..fb123bef4 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetWayPointsResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetWayPointsResponseTests.java
@@ -18,7 +18,7 @@ import org.junit.Test;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
@@ -98,7 +98,7 @@ public class GetWayPointsResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java
index 432562631..7b7bd20ec 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ListFilesResponseTests.java
@@ -22,7 +22,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
@@ -93,7 +93,7 @@ public class ListFilesResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAppServiceInteractionResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAppServiceInteractionResponseTests.java
index 58663a888..4280902e2 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAppServiceInteractionResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAppServiceInteractionResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
@@ -84,7 +84,7 @@ public class PerformAppServiceInteractionResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java
index 3fb489fca..7cff8e766 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class PerformAudioPassThruResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java
index dd81627b4..32c42c16c 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java
@@ -15,7 +15,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
@@ -93,7 +93,7 @@ public class PerformInteractionResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PublishAppServiceResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PublishAppServiceResponseTests.java
index 9659c992b..5bb6f923a 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PublishAppServiceResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PublishAppServiceResponseTests.java
@@ -22,7 +22,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
* This is a unit test class for the SmartDeviceLink library project class :
@@ -87,7 +87,7 @@ public class PublishAppServiceResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java
index 90faa7291..e95285db8 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
@@ -82,7 +82,7 @@ public class PutFileResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java
index 5948eb3f5..aec63227d 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java
@@ -19,7 +19,7 @@ import org.junit.Test;
import java.util.ArrayList;
import java.util.Hashtable;
import java.util.List;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
@@ -89,7 +89,7 @@ public class ReadDIDResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java
index 4a12bc5b3..862ed5342 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java
@@ -36,7 +36,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
* This is a unit test class for the SmartDeviceLink library project class :
@@ -176,7 +176,7 @@ public class RegisterAppInterfaceResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReleaseInteriorVehicleDataModuleResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReleaseInteriorVehicleDataModuleResponseTests.java
index 760623916..965980a0d 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReleaseInteriorVehicleDataModuleResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReleaseInteriorVehicleDataModuleResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.fail;
@@ -44,7 +44,7 @@ public class ReleaseInteriorVehicleDataModuleResponseTests extends BaseRpcTests
@Test
public void testJsonConstructor() {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java
index eb8ab1ae2..e8d3576e6 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ResetGlobalPropertiesResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class ResetGlobalPropertiesResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java
index e7ec116d4..4e12cb78c 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class ScrollableMessageResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java
index bf9461328..7208eeff4 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -61,7 +61,7 @@ public class SendLocationResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java
index dd850f46b..e6f0bf140 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class SetAppIconResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java
index b6e7be537..63d63dab9 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java
@@ -28,7 +28,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
* This is a unit test class for the SmartDeviceLink library project class :
@@ -113,7 +113,7 @@ public class SetDisplayLayoutResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java
index 04e099304..9765dcfba 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -61,7 +61,7 @@ public class SetGlobalPropertiesResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetInteriorVehicleDataResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetInteriorVehicleDataResponseTests.java
index cdb59146c..7abcdcecc 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetInteriorVehicleDataResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetInteriorVehicleDataResponseTests.java
@@ -22,7 +22,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
* This is a unit test class for the SmartDeviceLink library project class :
@@ -87,7 +87,7 @@ public class SetInteriorVehicleDataResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java
index 981f4e3f0..d8f699b5a 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java
@@ -17,7 +17,7 @@ import java.util.Hashtable;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
* This is a unit test class for the SmartDeviceLink library project class :
@@ -61,7 +61,7 @@ public class SetMediaClockTimerResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowAppMenuResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowAppMenuResponseTests.java
index a4b1dda0b..1cfafd319 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowAppMenuResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowAppMenuResponseTests.java
@@ -49,7 +49,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -91,7 +91,7 @@ public class ShowAppMenuResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java
index 06bb43dba..aa44a190b 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowConstantTbtResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -61,7 +61,7 @@ public class ShowConstantTbtResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java
index 6e6140068..ebd5f41b6 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java
@@ -17,7 +17,7 @@ import java.util.Hashtable;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
@@ -62,7 +62,7 @@ public class ShowResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java
index 8d288c73b..f454af9eb 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
@@ -81,7 +81,7 @@ public class SliderResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java
index 196c06f21..f2880d3eb 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class SpeakResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java
index 252a34aab..2dcfb0509 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -72,7 +72,7 @@ public class StreamRPCResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java
index 023fd8869..1c58b13bc 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java
@@ -17,7 +17,7 @@ import java.util.Hashtable;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
@@ -62,7 +62,7 @@ public class SubscribeButtonResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
index 6694886d9..def395e1e 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java
@@ -22,7 +22,7 @@ import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.fail;
/**
@@ -65,6 +65,8 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
msg.setFuelRange(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELRANGE.ordinal()));
msg.setTurnSignal(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TURNSIGNAL.ordinal()));
msg.setElectronicParkBrakeStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS.ordinal()));
+ msg.setHandsOffSteering(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING.ordinal()));
+ msg.setWindowStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WINDOWSTATUS.ordinal()));
msg.setOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA);
return msg;
@@ -117,7 +119,9 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
result.put(SubscribeVehicleDataResponse.KEY_MY_KEY, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_MYKEY.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_FUEL_RANGE, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELRANGE.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_TURN_SIGNAL, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TURNSIGNAL.ordinal()).serializeJSON());
+ result.put(SubscribeVehicleDataResponse.KEY_WINDOW_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WINDOWSTATUS.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS.ordinal()).serializeJSON());
+ result.put(SubscribeVehicleDataResponse.KEY_HANDS_OFF_STEERING, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING.ordinal()).serializeJSON());
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA.serializeJSON());
} catch (JSONException e) {
fail(TestValues.JSON_FAIL);
@@ -130,7 +134,7 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
* Tests the expected values of the RPC message.
*/
@Test
- public void testRpcValues () {
+ public void testRpcValues () {
// Test Values
VehicleDataResult testGps = ( (SubscribeVehicleDataResponse) msg ).getGps();
VehicleDataResult testOdometer = ( (SubscribeVehicleDataResponse) msg ).getOdometer();
@@ -160,6 +164,8 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
VehicleDataResult testFuelRange = ( (SubscribeVehicleDataResponse) msg ).getFuelRange();
VehicleDataResult testTurnSignal = ( (SubscribeVehicleDataResponse) msg ).getTurnSignal();
VehicleDataResult testEBrakeStatus = ( (SubscribeVehicleDataResponse) msg ).getElectronicParkBrakeStatus();
+ VehicleDataResult testHOffSteering = ( (SubscribeVehicleDataResponse) msg ).getHandsOffSteering();
+ VehicleDataResult testWindowStatus = ( (SubscribeVehicleDataResponse) msg ).getWindowStatus();
VehicleDataResult testOEMCustomVehicleData = ( (SubscribeVehicleDataResponse) msg ).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME);
// Valid Tests
@@ -191,6 +197,8 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
assertTrue(TestValues.TRUE, testFuelRange.getDataType().equals(VehicleDataType.VEHICLEDATA_FUELRANGE));
assertTrue(TestValues.TRUE, testTurnSignal.getDataType().equals(VehicleDataType.VEHICLEDATA_TURNSIGNAL));
assertTrue(TestValues.TRUE, testEBrakeStatus.getDataType().equals(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS));
+ assertTrue(TestValues.TRUE, testHOffSteering.getDataType().equals(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING));
+ assertTrue(TestValues.TRUE, testWindowStatus.getDataType().equals(VehicleDataType.VEHICLEDATA_WINDOWSTATUS));
assertTrue(TestValues.TRUE, testOEMCustomVehicleData.getOEMCustomVehicleDataType().equals(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
// Invalid/Null Tests
@@ -226,6 +234,8 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
assertNull(TestValues.NULL, msg.getFuelRange());
assertNull(TestValues.NULL, msg.getTurnSignal());
assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus());
+ assertNull(TestValues.NULL, msg.getHandsOffSteering());
+ assertNull(TestValues.NULL, msg.getWindowStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
@@ -234,7 +244,7 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
@@ -362,6 +372,14 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests {
VehicleDataResult referenceEBrakeStatus = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(electronicParkBrakeStatus));
assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceEBrakeStatus, cmd.getElectronicParkBrakeStatus()));
+ JSONObject handsOffSteering = JsonUtils.readJsonObjectFromJsonObject(parameters, SubscribeVehicleDataResponse.KEY_HANDS_OFF_STEERING);
+ VehicleDataResult referenceHandsOffSteering = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(handsOffSteering));
+ assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceHandsOffSteering, cmd.getHandsOffSteering()));
+
+ JSONObject windowStatus = JsonUtils.readJsonObjectFromJsonObject(parameters, SubscribeVehicleDataResponse.KEY_WINDOW_STATUS);
+ VehicleDataResult referenceWindowStatus = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(windowStatus));
+ assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceWindowStatus, cmd.getWindowStatus()));
+
JSONObject oemCustomVehicleDataName = JsonUtils.readJsonObjectFromJsonObject(parameters, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME);
VehicleDataResult referenceOemCustomData = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(oemCustomVehicleDataName));
assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceOemCustomData, cmd.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME)));
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeWaypointsResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeWaypointsResponseTests.java
index 817414ae1..239702805 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeWaypointsResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeWaypointsResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -59,7 +59,7 @@ public class SubscribeWaypointsResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java
index 3ccae2288..9f4e464f4 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class SystemRequestResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnpublishAppServiceResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnpublishAppServiceResponseTests.java
index 62264a884..7536dd2a7 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnpublishAppServiceResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnpublishAppServiceResponseTests.java
@@ -49,7 +49,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -95,7 +95,7 @@ public class UnpublishAppServiceResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java
index cb461a563..01aad979c 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class UnregisterAppInterfaceResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java
index afdedbdd0..3cf7d6491 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java
@@ -17,7 +17,7 @@ import java.util.Hashtable;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
@@ -62,7 +62,7 @@ public class UnsubscribeButtonResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
index f79b18b30..b79ddc4cf 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java
@@ -25,7 +25,7 @@ import static junit.framework.TestCase.assertNotNull;
import static junit.framework.TestCase.assertNull;
import static junit.framework.TestCase.assertTrue;
import static junit.framework.TestCase.fail;
-import static android.support.test.InstrumentationRegistry.getContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
/**
* This is a unit test class for the SmartDeviceLink library project class :
@@ -67,6 +67,8 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
msg.setFuelRange(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELRANGE.ordinal()));
msg.setTurnSignal(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TURNSIGNAL.ordinal()));
msg.setElectronicParkBrakeStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS.ordinal()));
+ msg.setWindowStatus(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WINDOWSTATUS.ordinal()));
+ msg.setHandsOffSteering(TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING.ordinal()));
msg.setOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA);
return msg;
@@ -120,6 +122,8 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
result.put(SubscribeVehicleDataResponse.KEY_FUEL_RANGE, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_FUELRANGE.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_TURN_SIGNAL, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_TURNSIGNAL.ordinal()).serializeJSON());
result.put(SubscribeVehicleDataResponse.KEY_ELECTRONIC_PARK_BRAKE_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS.ordinal()).serializeJSON());
+ result.put(SubscribeVehicleDataResponse.KEY_HANDS_OFF_STEERING, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING.ordinal()).serializeJSON());
+ result.put(SubscribeVehicleDataResponse.KEY_WINDOW_STATUS, TestValues.GENERAL_VEHICLEDATARESULT_LIST.get(VehicleDataType.VEHICLEDATA_WINDOWSTATUS.ordinal()).serializeJSON());
result.put(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA.serializeJSON());
} catch (JSONException e) {
fail(TestValues.JSON_FAIL);
@@ -132,7 +136,7 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
* Tests the expected values of the RPC message.
*/
@Test
- public void testRpcValues () {
+ public void testRpcValues () {
// Test Values
VehicleDataResult testGps = ( (UnsubscribeVehicleDataResponse) msg ).getGps();
VehicleDataResult testOdometer = ( (UnsubscribeVehicleDataResponse) msg ).getOdometer();
@@ -162,6 +166,8 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
VehicleDataResult testFuelRange = ( (UnsubscribeVehicleDataResponse) msg ).getFuelRange();
VehicleDataResult testTurnSignal = ( (UnsubscribeVehicleDataResponse) msg ).getTurnSignal();
VehicleDataResult testEBrakeStatus = ( (UnsubscribeVehicleDataResponse) msg ).getElectronicParkBrakeStatus();
+ VehicleDataResult testHOffSteering = ( (UnsubscribeVehicleDataResponse) msg ).getHandsOffSteering();
+ VehicleDataResult testWindowStatus = ( (UnsubscribeVehicleDataResponse) msg ).getWindowStatus();
VehicleDataResult testOemCustomData = ( (UnsubscribeVehicleDataResponse) msg ).getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME);
// Valid Tests
@@ -193,6 +199,8 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
assertTrue(TestValues.TRUE, testFuelRange.getDataType().equals(VehicleDataType.VEHICLEDATA_FUELRANGE));
assertTrue(TestValues.TRUE, testTurnSignal.getDataType().equals(VehicleDataType.VEHICLEDATA_TURNSIGNAL));
assertTrue(TestValues.TRUE, testEBrakeStatus.getDataType().equals(VehicleDataType.VEHICLEDATA_ELECTRONICPARKBRAKESTATUS));
+ assertTrue(TestValues.TRUE, testHOffSteering.getDataType().equals(VehicleDataType.VEHICLEDATA_HANDSOFFSTEERING));
+ assertTrue(TestValues.TRUE, testWindowStatus.getDataType().equals(VehicleDataType.VEHICLEDATA_WINDOWSTATUS));
assertTrue(TestValues.TRUE, testOemCustomData.getOEMCustomVehicleDataType().equals(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
// Invalid/Null Tests
@@ -228,6 +236,8 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
assertNull(TestValues.NULL, msg.getFuelRange());
assertNull(TestValues.NULL, msg.getTurnSignal());
assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus());
+ assertNull(TestValues.NULL, msg.getHandsOffSteering());
+ assertNull(TestValues.NULL, msg.getWindowStatus());
assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME));
}
@@ -236,7 +246,7 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
@@ -364,6 +374,14 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests {
VehicleDataResult referenceEBrakeStatus = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(eBrakeStatus));
assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceEBrakeStatus, cmd.getElectronicParkBrakeStatus()));
+ JSONObject handsOffSteering = JsonUtils.readJsonObjectFromJsonObject(parameters, UnsubscribeVehicleDataResponse.KEY_HANDS_OFF_STEERING);
+ VehicleDataResult referenceHandsOffSteering = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(handsOffSteering));
+ assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceHandsOffSteering, cmd.getHandsOffSteering()));
+
+ JSONObject windowStatus = JsonUtils.readJsonObjectFromJsonObject(parameters, UnsubscribeVehicleDataResponse.KEY_WINDOW_STATUS);
+ VehicleDataResult referenceWindowStatus = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(windowStatus));
+ assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceWindowStatus, cmd.getWindowStatus()));
+
JSONObject oemCustomData = JsonUtils.readJsonObjectFromJsonObject(parameters, TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME);
VehicleDataResult referenceOemCustomData = new VehicleDataResult(JsonRPCMarshaller.deserializeJSONObject(oemCustomData));
assertTrue(TestValues.TRUE, Validator.validateVehicleDataResult(referenceOemCustomData, cmd.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME)));
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeWayPointsResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeWayPointsResponseTests.java
index 49017109a..5360c023c 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeWayPointsResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeWayPointsResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -59,7 +59,7 @@ public class UnsubscribeWayPointsResponseTests extends BaseRpcTests{
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java
index 603565803..47951d34c 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UpdateTurnListResponseTests.java
@@ -14,7 +14,7 @@ import org.json.JSONObject;
import org.junit.Test;
import java.util.Hashtable;
-import static android.support.test.InstrumentationRegistry.getTargetContext;
+import static androidx.test.platform.app.InstrumentationRegistry.getInstrumentation;
import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
@@ -60,7 +60,7 @@ public class UpdateTurnListResponseTests extends BaseRpcTests {
*/
@Test
public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType());
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
assertNotNull(TestValues.NOT_NULL, commandJson);
try {