diff options
100 files changed, 216 insertions, 216 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java index 9c909ddcd..89abc76cc 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/managers/file/FileManagerTests.java @@ -33,7 +33,7 @@ import java.util.ArrayList; import java.util.List; import java.util.Map; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertTrue; import static org.junit.Assert.assertEquals; import static org.junit.Assert.assertFalse; @@ -58,7 +58,7 @@ public class FileManagerTests { @Before public void setUp() throws Exception{ - mTestContext = getContext(); + mTestContext = getTargetContext(); validFile = new SdlFile(); validFile.setName(TestValues.GENERAL_STRING); validFile.setFileData(TestValues.GENERAL_BYTE_ARRAY); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java index 6e12c1bf1..385362be8 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/proxy/SdlProxyBaseTests.java @@ -46,7 +46,7 @@ import static org.mockito.ArgumentMatchers.any; import static org.mockito.Mockito.doAnswer; import static org.mockito.Mockito.doReturn; import static org.mockito.Mockito.mock; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; @RunWith(AndroidJUnit4.class) public class SdlProxyBaseTests { @@ -60,8 +60,8 @@ public class SdlProxyBaseTests { @Test public void testNullSdlProxyConfigurationResources() { SdlProxyALM proxy = null; - SdlProxyBuilder.Builder builder = new SdlProxyBuilder.Builder(mock(IProxyListenerALM.class), "appId", "appName", true, getContext()); - SdlProxyConfigurationResources config = new SdlProxyConfigurationResources("path", (TelephonyManager) getContext().getSystemService(Context.TELEPHONY_SERVICE)); + SdlProxyBuilder.Builder builder = new SdlProxyBuilder.Builder(mock(IProxyListenerALM.class), "appId", "appName", true, getTargetContext()); + SdlProxyConfigurationResources config = new SdlProxyConfigurationResources("path", (TelephonyManager) getTargetContext().getSystemService(Context.TELEPHONY_SERVICE)); //Construct with a non-null SdlProxyConfigurationResources builder.setSdlProxyConfigurationResources(config); try { @@ -127,14 +127,14 @@ public class SdlProxyBaseTests { @Test public void testRemoteDisplayStreaming(){ SdlProxyALM proxy = null; - SdlProxyBuilder.Builder builder = new SdlProxyBuilder.Builder(mock(IProxyListenerALM.class), "appId", "appName", true, getContext()); + SdlProxyBuilder.Builder builder = new SdlProxyBuilder.Builder(mock(IProxyListenerALM.class), "appId", "appName", true, getTargetContext()); try{ proxy = builder.build(); // public void startRemoteDisplayStream(Context context, final Class<? extends SdlRemoteDisplay> remoteDisplay, final VideoStreamingParameters parameters, final boolean encrypted){ Method m = SdlProxyALM.class.getDeclaredMethod("startRemoteDisplayStream", Context.class, SdlRemoteDisplay.class, VideoStreamingParameters.class, boolean.class); assertNotNull(m); m.setAccessible(true); - m.invoke(proxy,getContext(), SdlRemoteDisplayTest.MockRemoteDisplay.class, (VideoStreamingParameters)null, false); + m.invoke(proxy,getTargetContext(), SdlRemoteDisplayTest.MockRemoteDisplay.class, (VideoStreamingParameters)null, false); assert true; }catch (Exception e){ diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCConstructorsTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCConstructorsTests.java index 24ca214b8..20944a117 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCConstructorsTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/RPCConstructorsTests.java @@ -21,7 +21,7 @@ import java.util.Arrays; import java.util.HashMap; import java.util.List; import java.util.Map; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertTrue; /** @@ -61,7 +61,7 @@ public class RPCConstructorsTests { private Map<String, List<Parameter>> getRPCMandatoryParamsMap(String fileName) { Map<String, List<Parameter>> rpcMandatoryParamsMap = new HashMap<>(); try { - InputStream stream = getContext().getAssets().open(fileName); + InputStream stream = getTargetContext().getAssets().open(fileName); XmlPullParserFactory xmlFactoryObject = XmlPullParserFactory.newInstance(); XmlPullParser myParser = xmlFactoryObject.newPullParser(); myParser.setInput(stream, null); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AddCommandTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AddCommandTests.java index 53edea6d4..d31ff4464 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AddCommandTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AddCommandTests.java @@ -18,7 +18,7 @@ import org.junit.Test; import java.util.Hashtable; import java.util.List; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertTrue; @@ -108,7 +108,7 @@ public class AddCommandTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AddSubmenuTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AddSubmenuTests.java index bdb666303..da2bbfab8 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AddSubmenuTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AddSubmenuTests.java @@ -23,7 +23,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -108,7 +108,7 @@ public class AddSubmenuTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AlertManeuverTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AlertManeuverTests.java index b47d79c33..f7c2c3218 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AlertManeuverTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AlertManeuverTests.java @@ -26,7 +26,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -95,7 +95,7 @@ public class AlertManeuverTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AlertTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AlertTests.java index 9b59ac694..e9a455ce5 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AlertTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/AlertTests.java @@ -27,7 +27,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -136,7 +136,7 @@ public class AlertTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ButtonPressTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ButtonPressTests.java index 783f67218..63a411fe6 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ButtonPressTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ButtonPressTests.java @@ -18,7 +18,7 @@ import org.junit.Test; import java.util.Hashtable; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertNull; @@ -101,7 +101,7 @@ public class ButtonPressTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CancelInteractionTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CancelInteractionTests.java index 97a0aacfb..bed52225c 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CancelInteractionTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CancelInteractionTests.java @@ -53,7 +53,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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -120,7 +120,7 @@ public class CancelInteractionTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java index b47224c1a..05c8dddd5 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java @@ -16,7 +16,7 @@ import org.junit.Test; import java.util.Hashtable; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertNull; @@ -89,7 +89,7 @@ public class ChangeRegistrationTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CloseApplicationTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CloseApplicationTests.java index 763fe9ea9..99428fae2 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CloseApplicationTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CloseApplicationTests.java @@ -52,7 +52,7 @@ import java.util.Hashtable; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.fail; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -96,7 +96,7 @@ public class CloseApplicationTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CreateInteractionChoiceSetTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CreateInteractionChoiceSetTests.java index 5ee659f28..0d6ab0e2a 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CreateInteractionChoiceSetTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CreateInteractionChoiceSetTests.java @@ -24,7 +24,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -96,7 +96,7 @@ public class CreateInteractionChoiceSetTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CreateWindowTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CreateWindowTests.java index 17e383c3f..3e2ddee64 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CreateWindowTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/CreateWindowTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -104,7 +104,7 @@ public class CreateWindowTests extends BaseRpcTests { */ @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteCommandTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteCommandTests.java index cc4d317b3..4e485e8ff 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteCommandTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteCommandTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -83,7 +83,7 @@ public class DeleteCommandTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteFileTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteFileTests.java index 5b15d08c8..c95b85536 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteFileTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteFileTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -83,7 +83,7 @@ public class DeleteFileTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteInteractionChoiceSetTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteInteractionChoiceSetTests.java index 48b134366..c4ac6db5d 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteInteractionChoiceSetTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteInteractionChoiceSetTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -83,7 +83,7 @@ public class DeleteInteractionChoiceSetTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteSubMenuTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteSubMenuTests.java index dcf518107..12e982b94 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteSubMenuTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteSubMenuTests.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 android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertNull; @@ -82,7 +82,7 @@ public class DeleteSubMenuTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteWindowTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteWindowTests.java index 39cf0bc86..1f1b2ab89 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteWindowTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DeleteWindowTests.java @@ -18,7 +18,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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -82,7 +82,7 @@ public class DeleteWindowTests extends BaseRpcTests { */ @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DiagnosticMessageTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DiagnosticMessageTests.java index 05eb83e53..41accb797 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DiagnosticMessageTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DiagnosticMessageTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -100,7 +100,7 @@ public class DiagnosticMessageTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DialNumberTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DialNumberTests.java index 3940d0170..fc0db6117 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DialNumberTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/DialNumberTests.java @@ -18,7 +18,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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * Created by austinkirk on 6/6/17. @@ -83,7 +83,7 @@ public class DialNumberTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/EndAudioPassThruTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/EndAudioPassThruTests.java index 0421bc848..7694da1e6 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/EndAudioPassThruTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/EndAudioPassThruTests.java @@ -18,7 +18,7 @@ import java.util.Hashtable; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.fail; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -62,7 +62,7 @@ public class EndAudioPassThruTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetAppServiceDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetAppServiceDataTests.java index d94a1e143..2a9ab6641 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetAppServiceDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetAppServiceDataTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; public class GetAppServiceDataTests extends BaseRpcTests { @@ -93,7 +93,7 @@ public class GetAppServiceDataTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetDTCsTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetDTCsTests.java index 7282966e6..930debec5 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetDTCsTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetDTCsTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -88,7 +88,7 @@ public class GetDTCsTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetFileTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetFileTests.java index de678fc58..df19fa3de 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetFileTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetFileTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; public class GetFileTests extends BaseRpcTests { @@ -113,7 +113,7 @@ public class GetFileTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetInteriorVehicleDataConsentTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetInteriorVehicleDataConsentTests.java index a79c54c27..a6def432b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetInteriorVehicleDataConsentTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetInteriorVehicleDataConsentTests.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 android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertNull; @@ -77,7 +77,7 @@ public class GetInteriorVehicleDataConsentTests extends BaseRpcTests { @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetInteriorVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetInteriorVehicleDataTests.java index 12a2e3d4c..4ab5f5e6a 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetInteriorVehicleDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetInteriorVehicleDataTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -94,7 +94,7 @@ public class GetInteriorVehicleDataTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetSystemCapabilityTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetSystemCapabilityTests.java index 34e8d084c..f65473c3f 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetSystemCapabilityTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetSystemCapabilityTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; public class GetSystemCapabilityTests extends BaseRpcTests { @@ -85,7 +85,7 @@ public class GetSystemCapabilityTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java index e0ccf50ee..7ce293942 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetVehicleDataTests.java @@ -20,7 +20,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -198,7 +198,7 @@ public class GetVehicleDataTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetWayPointsTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetWayPointsTests.java index b3683206b..4037eb53d 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetWayPointsTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetWayPointsTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * Created by austinkirk on 6/6/17. @@ -83,7 +83,7 @@ public class GetWayPointsTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ListFilesTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ListFilesTests.java index 0c1c642ef..ac51ca8aa 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ListFilesTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ListFilesTests.java @@ -18,7 +18,7 @@ import java.util.Hashtable; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.fail; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -62,7 +62,7 @@ public class ListFilesTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformAppServiceInteractionTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformAppServiceInteractionTests.java index 3e8fb9069..0085f0f30 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformAppServiceInteractionTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformAppServiceInteractionTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; public class PerformAppServiceInteractionTests extends BaseRpcTests { @@ -110,7 +110,7 @@ public class PerformAppServiceInteractionTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformAudioPassThruTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformAudioPassThruTests.java index 28cb20eff..65c4b00dd 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformAudioPassThruTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformAudioPassThruTests.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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -129,7 +129,7 @@ public class PerformAudioPassThruTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformInteractionTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformInteractionTests.java index 088f9ad62..f363e06a2 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformInteractionTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PerformInteractionTests.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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -138,7 +138,7 @@ public class PerformInteractionTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PublishAppServiceTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PublishAppServiceTests.java index 9049a171c..fecad8073 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PublishAppServiceTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PublishAppServiceTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; public class PublishAppServiceTests extends BaseRpcTests { @@ -92,7 +92,7 @@ public class PublishAppServiceTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PutFileTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PutFileTests.java index b3fe612e3..d5834414d 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PutFileTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/PutFileTests.java @@ -21,7 +21,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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -130,7 +130,7 @@ public class PutFileTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ReadDidTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ReadDidTests.java index f1b4b02b0..f528e34ce 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ReadDidTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ReadDidTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -91,7 +91,7 @@ public class ReadDidTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/RegisterAppInterfaceTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/RegisterAppInterfaceTests.java index 8741eda76..74035cb7c 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/RegisterAppInterfaceTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/RegisterAppInterfaceTests.java @@ -31,7 +31,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -169,7 +169,7 @@ public class RegisterAppInterfaceTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ReleaseInteriorVehicleDataModuleTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ReleaseInteriorVehicleDataModuleTests.java index 7fe5194d2..280e4f11b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ReleaseInteriorVehicleDataModuleTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ReleaseInteriorVehicleDataModuleTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; public class ReleaseInteriorVehicleDataModuleTests extends BaseRpcTests { @@ -75,7 +75,7 @@ public class ReleaseInteriorVehicleDataModuleTests extends BaseRpcTests { @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java index 616f429fa..89cef762e 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.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.fail; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -89,7 +89,7 @@ public class ResetGlobalPropertiesTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ScrollableMessageTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ScrollableMessageTests.java index 7e462367a..632769924 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ScrollableMessageTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ScrollableMessageTests.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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -108,7 +108,7 @@ public class ScrollableMessageTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SendLocationTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SendLocationTests.java index 5aad3a782..c92eac6ec 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SendLocationTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SendLocationTests.java @@ -23,7 +23,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -117,7 +117,7 @@ public class SendLocationTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull("Command object is null", commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetAppIconTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetAppIconTests.java index 56cb3e4a1..e4df0a44b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetAppIconTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetAppIconTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -83,7 +83,7 @@ public class SetAppIconTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetDisplayLayoutTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetDisplayLayoutTests.java index 438634d38..56f0dc0bc 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetDisplayLayoutTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetDisplayLayoutTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** @@ -97,7 +97,7 @@ public class SetDisplayLayoutTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetGlobalPropertiesTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetGlobalPropertiesTests.java index d041e9a19..51adf5c7c 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetGlobalPropertiesTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetGlobalPropertiesTests.java @@ -29,7 +29,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -128,7 +128,7 @@ public class SetGlobalPropertiesTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetInteriorVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetInteriorVehicleDataTests.java index f0855e43e..ecffe1b21 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetInteriorVehicleDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetInteriorVehicleDataTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -86,7 +86,7 @@ public class SetInteriorVehicleDataTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetMediaClockTimerTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetMediaClockTimerTests.java index 76d5fc588..5e97d8633 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetMediaClockTimerTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetMediaClockTimerTests.java @@ -24,7 +24,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -169,7 +169,7 @@ public class SetMediaClockTimerTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowAppMenuTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowAppMenuTests.java index 81fa29a72..eb2526e54 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowAppMenuTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowAppMenuTests.java @@ -54,7 +54,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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -116,7 +116,7 @@ public class ShowAppMenuTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java index 82fe4bb1f..4a3034eee 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowConstantTbtTests.java @@ -26,7 +26,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -140,7 +140,7 @@ public class ShowConstantTbtTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowTests.java index b4264adf2..de39d2733 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ShowTests.java @@ -29,7 +29,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -156,7 +156,7 @@ public class ShowTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(),getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(),getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SliderTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SliderTests.java index 36a2b0b14..c375d2d4d 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SliderTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SliderTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -111,7 +111,7 @@ public class SliderTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SpeakTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SpeakTests.java index 1a42c9cc1..4681975fe 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SpeakTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SpeakTests.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 android.support.test.InstrumentationRegistry.getTargetContext; public class SpeakTests extends BaseRpcTests { @@ -85,7 +85,7 @@ public class SpeakTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.java index b33dd6e39..534e65576 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeButtonTests.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 android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertNull; @@ -83,7 +83,7 @@ public class SubscribeButtonTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java index cfcb7aae7..d319d1b11 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeVehicleDataTests.java @@ -20,7 +20,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -194,7 +194,7 @@ public class SubscribeVehicleDataTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeWayPointsTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeWayPointsTests.java index 7b43fd429..894ef026e 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeWayPointsTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SubscribeWayPointsTests.java @@ -18,7 +18,7 @@ import java.util.Hashtable; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.fail; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * Created by austinkirk on 6/7/17. @@ -61,7 +61,7 @@ public class SubscribeWayPointsTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SystemRequestTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SystemRequestTests.java index 89dff378b..217e4da58 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SystemRequestTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SystemRequestTests.java @@ -23,7 +23,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 android.support.test.InstrumentationRegistry.getTargetContext; /** @@ -104,7 +104,7 @@ public class SystemRequestTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnpublishAppServiceTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnpublishAppServiceTests.java index a1a5ad3b3..f038121a7 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnpublishAppServiceTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnpublishAppServiceTests.java @@ -54,7 +54,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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -128,7 +128,7 @@ public class UnpublishAppServiceTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnregisterAppInterfaceTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnregisterAppInterfaceTests.java index b0d61bff4..e400ff73b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnregisterAppInterfaceTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnregisterAppInterfaceTests.java @@ -18,7 +18,7 @@ import java.util.Hashtable; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.fail; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -62,7 +62,7 @@ public class UnregisterAppInterfaceTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeButtonTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeButtonTests.java index 94ff33f43..9b786cb7d 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeButtonTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeButtonTests.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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -85,7 +85,7 @@ public class UnsubscribeButtonTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java index a26c784fd..0f2098c54 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeVehicleDataTests.java @@ -21,7 +21,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 android.support.test.InstrumentationRegistry.getTargetContext; /** @@ -199,7 +199,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeWayPointsTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeWayPointsTests.java index dee3f0d26..d595b8ec9 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeWayPointsTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UnsubscribeWayPointsTests.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 android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.fail; @@ -60,7 +60,7 @@ public class UnsubscribeWayPointsTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UpdateTurnListTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UpdateTurnListTests.java index 82d3f7502..3f2e37a03 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UpdateTurnListTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/UpdateTurnListTests.java @@ -26,7 +26,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 android.support.test.InstrumentationRegistry.getTargetContext; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -98,7 +98,7 @@ public class UpdateTurnListTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { 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 bb500ef84..94346fdb2 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 b8962b117..ec355539d 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 4de247c89..f26a09f4a 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 61dd14116..ff260f23f 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 682496704..e1fb2746a 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 69c9e44ee..60996445c 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 2781d2189..2318a4e46 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 ad0c5c6ea..d5ca5d0c1 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 e624da646..7a313531c 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 9d4c4673d..e70402ecd 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 8fc7ebf69..d42a1e53e 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 bf68f125a..9625cf3d5 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 cc7445da1..9d999e1b7 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 17bc3efbf..243c9ab3b 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 ca7ee54ba..464efa60c 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 f5c67ed35..6b62d3200 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** @@ -101,7 +101,7 @@ public class GetFileResponseTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 dc1818180..fd3e793f5 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 28d267b5d..80a0a8b8d 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; public class GetSystemCapabilityResponseTests extends BaseRpcTests { @@ -80,7 +80,7 @@ public class GetSystemCapabilityResponseTests extends BaseRpcTests { */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 ec3457f5e..d09494913 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 @@ -40,7 +40,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 android.support.test.InstrumentationRegistry.getTargetContext; /** @@ -505,7 +505,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { 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 21c401c82..f133e2bed 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 e7c7fb794..432562631 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** @@ -93,7 +93,7 @@ public class ListFilesResponseTests extends BaseRpcTests{ */ @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 bdf3e61be..58663a888 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 8b5c024df..9659c992b 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 f99af82d5..760623916 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 9763f48b6..eb8ab1ae2 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 f01be86d1..bf9461328 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 e04531c5f..cdb59146c 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; /** * 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 198c45751..a4b1dda0b 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 9a2c90ca4..06bb43dba 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 43195c80b..252a34aab 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { 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 2c0b24e99..817414ae1 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), 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 bc43cc1bf..62264a884 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { 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 6c9c503f8..49017109a 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(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 0db5a943c..603565803 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.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; 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(getContext(), getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getTargetContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/transport/MultiplexTransportConfigTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/transport/MultiplexTransportConfigTests.java index 021465d93..8fae50a8b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/transport/MultiplexTransportConfigTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/transport/MultiplexTransportConfigTests.java @@ -7,7 +7,7 @@ import com.smartdevicelink.transport.MultiplexTransportConfig; import org.junit.Test; import org.junit.runner.RunWith; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertEquals; @RunWith(AndroidJUnit4.class) @@ -15,16 +15,16 @@ public class MultiplexTransportConfigTests { @Test public void testDefaultSecurity(){ - MultiplexTransportConfig config = new MultiplexTransportConfig(getContext(), "2341"); + MultiplexTransportConfig config = new MultiplexTransportConfig(getTargetContext(), "2341"); assertEquals(config.getSecurityLevel(), MultiplexTransportConfig.FLAG_MULTI_SECURITY_MED); } @Test public void testSettingSecurity(){ - MultiplexTransportConfig config = new MultiplexTransportConfig(getContext(), "2341", MultiplexTransportConfig.FLAG_MULTI_SECURITY_HIGH); + MultiplexTransportConfig config = new MultiplexTransportConfig(getTargetContext(), "2341", MultiplexTransportConfig.FLAG_MULTI_SECURITY_HIGH); assertEquals(config.getSecurityLevel(), MultiplexTransportConfig.FLAG_MULTI_SECURITY_HIGH); - config = new MultiplexTransportConfig(getContext(), "2341"); + config = new MultiplexTransportConfig(getTargetContext(), "2341"); config.setSecurityLevel(MultiplexTransportConfig.FLAG_MULTI_SECURITY_HIGH); assertEquals(config.getSecurityLevel(), MultiplexTransportConfig.FLAG_MULTI_SECURITY_HIGH); } diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/utl/AndroidToolsTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/utl/AndroidToolsTests.java index 95723696a..8b0389dbb 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/utl/AndroidToolsTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/utl/AndroidToolsTests.java @@ -10,7 +10,7 @@ import junit.framework.Assert; import org.junit.Test; import org.junit.runner.RunWith; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; @RunWith(AndroidJUnit4.class) public class AndroidToolsTests { @@ -19,7 +19,7 @@ public class AndroidToolsTests { public void testIsServiceExportedNormal(){ try{ - AndroidTools.isServiceExported(getContext(), new ComponentName(getContext(), "test")); + AndroidTools.isServiceExported(getTargetContext(), new ComponentName(getTargetContext(), "test")); }catch(Exception e){ Assert.fail("Exception during normal test: " + e.getMessage()); } @@ -29,7 +29,7 @@ public class AndroidToolsTests { public void testIsServiceExportedNull(){ try{ - AndroidTools.isServiceExported(getContext(), null); + AndroidTools.isServiceExported(getTargetContext(), null); Assert.fail("Proccessed null data"); }catch(Exception e){ diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java index 0463da9b5..192f3aa3c 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/MultiplexTransportTest.java @@ -16,7 +16,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertEquals; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertNull; @@ -33,7 +33,7 @@ public class MultiplexTransportTest { @Before public void setUp() throws Exception { - rsvp = new RouterServiceValidator(getContext()); + rsvp = new RouterServiceValidator(getTargetContext()); rsvp.setFlags(RouterServiceValidator.FLAG_DEBUG_NONE); rsvp.validate(); @@ -61,7 +61,7 @@ public class MultiplexTransportTest { @Test public void testThreadRecoverability(){ - MultiplexTransportConfig config = new MultiplexTransportConfig(getContext(),SdlUnitTestContants.TEST_APP_ID); + MultiplexTransportConfig config = new MultiplexTransportConfig(getTargetContext(),SdlUnitTestContants.TEST_APP_ID); // public MultiplexTransport(MultiplexTransportConfig transportConfig, final ITransportListener transportListener){ MultiplexTransport trans = new MultiplexTransport(config,transportListener); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/TransportBrokerTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/TransportBrokerTest.java index 29f407285..d74501313 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/TransportBrokerTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/transport/TransportBrokerTest.java @@ -14,7 +14,7 @@ import org.junit.Before; import org.junit.Test; import org.junit.runner.RunWith; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertFalse; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertTrue; @@ -26,7 +26,7 @@ public class TransportBrokerTest { @Before public void setUp() throws Exception { - rsvp = new RouterServiceValidator(getContext()); + rsvp = new RouterServiceValidator(getTargetContext()); rsvp.validate(); } @@ -42,7 +42,7 @@ public class TransportBrokerTest { if (Looper.myLooper() == null) { Looper.prepare(); } - TransportBroker broker = new TransportBroker(getContext(), SdlUnitTestContants.TEST_APP_ID,rsvp.getService()); + TransportBroker broker = new TransportBroker(getTargetContext(), SdlUnitTestContants.TEST_APP_ID,rsvp.getService()); if(!DeviceUtil.isEmulator()){ // Cannot perform MBT operations in emulator assertTrue(broker.start()); } @@ -56,7 +56,7 @@ public class TransportBrokerTest { Looper.prepare(); } - TransportBroker broker = new TransportBroker(getContext(), SdlUnitTestContants.TEST_APP_ID,rsvp.getService()); + TransportBroker broker = new TransportBroker(getTargetContext(), SdlUnitTestContants.TEST_APP_ID,rsvp.getService()); if(!DeviceUtil.isEmulator()){ // Cannot perform MBT operations in emulator assertTrue(broker.start()); @@ -90,7 +90,7 @@ public class TransportBrokerTest { if (Looper.myLooper() == null) { Looper.prepare(); } - TransportBroker broker = new TransportBroker(getContext(), SdlUnitTestContants.TEST_APP_ID, rsvp.getService()); + TransportBroker broker = new TransportBroker(getTargetContext(), SdlUnitTestContants.TEST_APP_ID, rsvp.getService()); if(!DeviceUtil.isEmulator()){ // Cannot perform MBT operations in emulator assertTrue(broker.start()); } @@ -103,7 +103,7 @@ public class TransportBrokerTest { Looper.prepare(); } - TransportBroker broker = new TransportBroker(getContext(), SdlUnitTestContants.TEST_APP_ID, rsvp.getService()); + TransportBroker broker = new TransportBroker(getTargetContext(), SdlUnitTestContants.TEST_APP_ID, rsvp.getService()); Handler handler = new Handler(); Message message = new Message(); broker.routerServiceMessenger = null; diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/util/MediaStreamingStatusTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/util/MediaStreamingStatusTests.java index e4bf07a29..9a204df9b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/util/MediaStreamingStatusTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/util/MediaStreamingStatusTests.java @@ -21,7 +21,7 @@ import org.mockito.stubbing.Answer; import java.util.Vector; -import static android.support.test.InstrumentationRegistry.getContext; +import static android.support.test.InstrumentationRegistry.getTargetContext; import static junit.framework.TestCase.assertFalse; import static junit.framework.TestCase.assertNotNull; import static junit.framework.TestCase.assertNull; @@ -106,11 +106,11 @@ public class MediaStreamingStatusTests { @Test public void testSdlManagerMedia(){ - SdlManager.Builder builder = new SdlManager.Builder(getContext(), TestValues.GENERAL_FULL_APP_ID, TestValues.GENERAL_STRING, mock(SdlManagerListener.class)); + SdlManager.Builder builder = new SdlManager.Builder(getTargetContext(), TestValues.GENERAL_FULL_APP_ID, TestValues.GENERAL_STRING, mock(SdlManagerListener.class)); Vector<AppHMIType> appType = new Vector<>(); appType.add(AppHMIType.MEDIA); builder.setAppTypes(appType); - MultiplexTransportConfig multiplexTransportConfig = new MultiplexTransportConfig(getContext(), TestValues.GENERAL_FULL_APP_ID); + MultiplexTransportConfig multiplexTransportConfig = new MultiplexTransportConfig(getTargetContext(), TestValues.GENERAL_FULL_APP_ID); assertNull(multiplexTransportConfig.requiresAudioSupport()); builder.setTransportType(multiplexTransportConfig); @@ -124,11 +124,11 @@ public class MediaStreamingStatusTests { @Test public void testSdlManagerNonMedia(){ - SdlManager.Builder builder = new SdlManager.Builder(getContext(), TestValues.GENERAL_FULL_APP_ID, TestValues.GENERAL_STRING, mock(SdlManagerListener.class)); + SdlManager.Builder builder = new SdlManager.Builder(getTargetContext(), TestValues.GENERAL_FULL_APP_ID, TestValues.GENERAL_STRING, mock(SdlManagerListener.class)); Vector<AppHMIType> appType = new Vector<>(); appType.add(AppHMIType.DEFAULT); builder.setAppTypes(appType); - MultiplexTransportConfig multiplexTransportConfig = new MultiplexTransportConfig(getContext(), TestValues.GENERAL_FULL_APP_ID); + MultiplexTransportConfig multiplexTransportConfig = new MultiplexTransportConfig(getTargetContext(), TestValues.GENERAL_FULL_APP_ID); assertNull(multiplexTransportConfig.requiresAudioSupport()); builder.setTransportType(multiplexTransportConfig); @@ -142,7 +142,7 @@ public class MediaStreamingStatusTests { @Test public void testAcceptedBTDevices(){ - MediaStreamingStatus mediaStreamingStatus = spy(new MediaStreamingStatus(getContext(), mock(MediaStreamingStatus.Callback.class))); + MediaStreamingStatus mediaStreamingStatus = spy(new MediaStreamingStatus(getTargetContext(), mock(MediaStreamingStatus.Callback.class))); doAnswer(new Answer() { @Override @@ -157,7 +157,7 @@ public class MediaStreamingStatusTests { @Test public void testAcceptedUSBDevices(){ - MediaStreamingStatus mediaStreamingStatus = spy(new MediaStreamingStatus(getContext(), mock(MediaStreamingStatus.Callback.class))); + MediaStreamingStatus mediaStreamingStatus = spy(new MediaStreamingStatus(getTargetContext(), mock(MediaStreamingStatus.Callback.class))); doAnswer(new Answer() { @Override |