diff options
author | RHenigan <heniganr1@gmail.com> | 2020-06-17 09:56:23 -0400 |
---|---|---|
committer | RHenigan <heniganr1@gmail.com> | 2020-06-17 09:56:23 -0400 |
commit | 65f9523cc5a3a5de52c42d49b01409d76a58fd8d (patch) | |
tree | 5922d185a78856a36f8090fefe18cc03582e0be1 | |
parent | 8196cfadd1cb86c0f393f720c6a1a45c09350d5e (diff) | |
download | sdl_android-65f9523cc5a3a5de52c42d49b01409d76a58fd8d.tar.gz |
Refactor BaseRpcTest and all child classes
150 files changed, 1313 insertions, 121 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/BaseRpcTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/BaseRpcTests.java index 023a6f8e9..db9d7f5b2 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/BaseRpcTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/BaseRpcTests.java @@ -1,6 +1,7 @@ package com.smartdevicelink.test; -import com.smartdevicelink.AndroidTestCase2; +import android.support.test.runner.AndroidJUnit4; + import com.smartdevicelink.proxy.RPCMessage; import com.smartdevicelink.proxy.RPCRequest; import com.smartdevicelink.proxy.RPCResponse; @@ -8,10 +9,19 @@ import com.smartdevicelink.proxy.RPCResponse; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Before; +import org.junit.Test; +import org.junit.runner.RunWith; import java.util.Iterator; -public abstract class BaseRpcTests extends AndroidTestCase2 { +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; + +@RunWith(AndroidJUnit4.class) +public abstract class BaseRpcTests { public static final int SDL_VERSION_UNDER_TEST = Config.SDL_VERSION_UNDER_TEST; @@ -39,7 +49,7 @@ public abstract class BaseRpcTests extends AndroidTestCase2 { */ protected abstract JSONObject getExpectedParameters(int sdlVersion); - @Override + @Before public void setUp(){ this.msg = createMessage(); if (msg instanceof RPCRequest) { @@ -51,10 +61,12 @@ public abstract class BaseRpcTests extends AndroidTestCase2 { } + @Test public void testCreation(){ assertNotNull("Object creation failed.", msg); } + @Test public void testCorrelationId(){ int correlationId; if (msg instanceof RPCRequest) { @@ -68,6 +80,7 @@ public abstract class BaseRpcTests extends AndroidTestCase2 { } + @Test public void testMessageType(){ String messageType = msg.getMessageType(); @@ -75,6 +88,7 @@ public abstract class BaseRpcTests extends AndroidTestCase2 { assertEquals("Message type was not REQUEST.", getMessageType(), messageType); } + @Test public void testCommandType(){ String command = msg.getFunctionName(); @@ -83,6 +97,7 @@ public abstract class BaseRpcTests extends AndroidTestCase2 { } + @Test public void testFunctionName(){ String funcName = msg.getFunctionName(); @@ -90,6 +105,7 @@ public abstract class BaseRpcTests extends AndroidTestCase2 { assertEquals("Function name did not match expected name.", getCommandType(), funcName); } + @Test public void testJson(){ try{ JSONObject reference = buildJsonStore(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAppInterfaceUnregisteredTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAppInterfaceUnregisteredTests.java index f75b79b83..4731de4fd 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAppInterfaceUnregisteredTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAppInterfaceUnregisteredTests.java @@ -9,6 +9,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -51,6 +57,7 @@ public class OnAppInterfaceUnregisteredTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values AppInterfaceUnregisteredReason reason = ( (OnAppInterfaceUnregistered) msg ).getReason(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAppServiceDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAppServiceDataTests.java index ec2125b77..10affe5f0 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAppServiceDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAppServiceDataTests.java @@ -9,6 +9,13 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : @@ -51,6 +58,7 @@ public class OnAppServiceDataTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values AppServiceData cmdId = ( (OnAppServiceData) msg ).getServiceData(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAudioPassThruTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAudioPassThruTests.java index f5b9117ef..dc50a7b58 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAudioPassThruTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnAudioPassThruTests.java @@ -7,6 +7,9 @@ import com.smartdevicelink.test.BaseRpcTests; import com.smartdevicelink.test.TestValues; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -37,6 +40,7 @@ public class OnAudioPassThruTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests OnAudioPassThru msg = new OnAudioPassThru(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonEventTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonEventTests.java index 41e2030bc..2ed9edbf3 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonEventTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonEventTests.java @@ -10,6 +10,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -56,6 +62,7 @@ public class OnButtonEventTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int cmdId = ( (OnButtonEvent) msg ).getCustomButtonID(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java index a4583616b..e44bf48bf 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnButtonPressTests.java @@ -10,6 +10,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -56,6 +62,7 @@ public class OnButtonPressTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int customName = ( (OnButtonPress) msg ).getCustomButtonID(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnCommandTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnCommandTests.java index 7f72cf219..ade4ac3e2 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnCommandTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnCommandTests.java @@ -9,6 +9,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -53,6 +59,7 @@ public class OnCommandTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int cmdId = ( (OnCommand) msg ).getCmdID(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnDriverDistractionTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnDriverDistractionTests.java index bf0581cd0..d554ff28e 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnDriverDistractionTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnDriverDistractionTests.java @@ -9,6 +9,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -53,6 +59,7 @@ public class OnDriverDistractionTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values DriverDistractionState cmdId = ( (OnDriverDistraction) msg ).getState(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnErrorTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnErrorTests.java index bcd3563f6..f0c542894 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnErrorTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnErrorTests.java @@ -6,6 +6,8 @@ import com.smartdevicelink.test.TestValues; import junit.framework.TestCase; +import org.junit.Test; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.callbacks.OnError} @@ -17,6 +19,7 @@ public class OnErrorTests extends TestCase { * {@link com.smartdevicelink.proxy.callbacks.OnError#OnError()} * {@link com.smartdevicelink.proxy.callbacks.OnError#OnError(String, Exception)} */ + @Test public void testValues () { // Valid Tests OnError testOnError = new OnError(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnHMIStatusTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnHMIStatusTests.java index 70c9a728a..c0206c960 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnHMIStatusTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnHMIStatusTests.java @@ -13,6 +13,12 @@ import com.smartdevicelink.util.Version; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -64,6 +70,7 @@ public class OnHMIStatusTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values AudioStreamingState audioStreamingState = ( (OnHMIStatus) msg ).getAudioStreamingState(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnHashChangeTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnHashChangeTests.java index 50b866314..785acc62b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnHashChangeTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnHashChangeTests.java @@ -8,6 +8,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -52,6 +58,7 @@ public class OnHashChangeTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String hashId = ( (OnHashChange) msg ).getHashID(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnInteriorVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnInteriorVehicleDataTests.java index ba20dbae0..9d3823499 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnInteriorVehicleDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnInteriorVehicleDataTests.java @@ -11,6 +11,12 @@ import com.smartdevicelink.test.Validator; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -52,6 +58,7 @@ public class OnInteriorVehicleDataTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values ModuleData moduleData = ( (OnInteriorVehicleData) msg ).getModuleData(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnKeyboardInputTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnKeyboardInputTests.java index 92e2a30cf..48d6d95af 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnKeyboardInputTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnKeyboardInputTests.java @@ -9,6 +9,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -53,6 +59,7 @@ public class OnKeyboardInputTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values KeyboardEvent event = ( (OnKeyboardInput) msg ).getEvent(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLanguageChangeTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLanguageChangeTests.java index 0f3ffae76..1030b2609 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLanguageChangeTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLanguageChangeTests.java @@ -9,6 +9,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -53,6 +59,7 @@ public class OnLanguageChangeTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Language lang = ( (OnLanguageChange) msg ).getLanguage(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java index a8afc88cc..d73b39beb 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnLockScreenStatusTests.java @@ -11,6 +11,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -59,6 +65,7 @@ public class OnLockScreenStatusTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Boolean status = ( (OnLockScreenStatus) msg ).getDriverDistractionStatus(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnPermissionsChangeTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnPermissionsChangeTests.java index 10c1313f7..e090afce8 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnPermissionsChangeTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnPermissionsChangeTests.java @@ -10,9 +10,16 @@ import com.smartdevicelink.test.Validator; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.OnPermissionsChange} @@ -56,6 +63,7 @@ public class OnPermissionsChangeTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<PermissionItem> data = ( (OnPermissionsChange) msg ).getPermissionItem(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnProxyClosedTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnProxyClosedTests.java index efa954b24..1ef639029 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnProxyClosedTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnProxyClosedTests.java @@ -7,6 +7,8 @@ import com.smartdevicelink.test.TestValues; import junit.framework.TestCase; +import org.junit.Test; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.callbacks.OnProxyClosed} @@ -18,6 +20,7 @@ public class OnProxyClosedTests extends TestCase { * {@link com.smartdevicelink.proxy.callbacks.OnProxyClosed#OnProxyClosed()} * {@link com.smartdevicelink.proxy.callbacks.OnProxyClosed#OnProxyClosed(String, Exception, SdlDisconnectedReason)} */ + @Test public void testValues () { // Valid Tests OnProxyClosed testOnProxyClosed = new OnProxyClosed(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnProxyOpenedTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnProxyOpenedTests.java index 6daef5687..3f76fd4cb 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnProxyOpenedTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnProxyOpenedTests.java @@ -6,6 +6,8 @@ import com.smartdevicelink.test.TestValues; import junit.framework.TestCase; +import org.junit.Test; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.callbacks.OnProxyOpened} @@ -18,6 +20,7 @@ public class OnProxyOpenedTests extends TestCase { * {@link com.smartdevicelink.proxy.callbacks.OnProxyOpened#OnProxyOpened()} * {@link com.smartdevicelink.proxy.callbacks.OnProxyOpened#getFunctionName()} */ + @Test public void testMethods () { OnProxyOpened testOnProxyOpened = new OnProxyOpened(); assertNotNull(TestValues.NOT_NULL, testOnProxyOpened); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnRCStatusTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnRCStatusTests.java index 319b6373c..c292756e6 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnRCStatusTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnRCStatusTests.java @@ -11,10 +11,15 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; + public class OnRCStatusTests extends BaseRpcTests { @Override protected RPCMessage createMessage() { @@ -69,6 +74,7 @@ public class OnRCStatusTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues() { // Test Values List<ModuleData> listAllocatedModules = ((OnRCStatus) msg).getAllocatedModules(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java index af0a2aba1..f3efebe84 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSdlChoiceChosenTests.java @@ -11,6 +11,13 @@ import com.smartdevicelink.test.Validator; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -58,6 +65,7 @@ public class OnSdlChoiceChosenTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values SdlChoice data = ( (OnSdlChoiceChosen) msg ).getSdlChoice(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnStreamRPCTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnStreamRPCTests.java index 5e5a4d3b0..863abf4e0 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnStreamRPCTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnStreamRPCTests.java @@ -8,6 +8,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * Created by austinkirk on 6/7/17. @@ -53,6 +59,7 @@ public class OnStreamRPCTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Long bytes = ((OnStreamRPC) msg).getBytesComplete(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSystemCapabilityUpdatedTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSystemCapabilityUpdatedTests.java index b9e12bb35..37fa2e570 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSystemCapabilityUpdatedTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSystemCapabilityUpdatedTests.java @@ -9,6 +9,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -51,6 +57,7 @@ public class OnSystemCapabilityUpdatedTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values SystemCapability cmdId = ( (OnSystemCapabilityUpdated) msg ).getSystemCapability(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSystemRequestTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSystemRequestTests.java index 0815f3c01..6ee431ea9 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSystemRequestTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnSystemRequestTests.java @@ -12,6 +12,13 @@ import com.smartdevicelink.test.Validator; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -66,6 +73,7 @@ public class OnSystemRequestTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values FileType fileType = ( (OnSystemRequest) msg ).getFileType(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnTBTClientStateTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnTBTClientStateTests.java index e9e7a14e3..54cd86851 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnTBTClientStateTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnTBTClientStateTests.java @@ -9,6 +9,12 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -51,6 +57,7 @@ public class OnTBTClientStateTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values TBTState data = ( (OnTBTClientState) msg ).getState(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnTouchEventTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnTouchEventTests.java index 70506eeea..16f048aa3 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnTouchEventTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnTouchEventTests.java @@ -11,9 +11,16 @@ import com.smartdevicelink.test.Validator; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.OnTouchEvent} @@ -56,6 +63,7 @@ public class OnTouchEventTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values TouchType type = ( (OnTouchEvent) msg ).getType(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java index daae07db4..76a7675a1 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnVehicleDataTests.java @@ -32,11 +32,18 @@ import com.smartdevicelink.test.VehicleDataHelper; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Iterator; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.OnVehicleData} @@ -103,6 +110,7 @@ public class OnVehicleDataTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Double speed = ( (OnVehicleData) msg).getSpeed(); @@ -204,7 +212,8 @@ public class OnVehicleDataTests extends BaseRpcTests{ assertNull(TestValues.NULL, msg.getElectronicParkBrakeStatus()); assertNull(TestValues.NULL, msg.getOEMCustomVehicleData(TestValues.GENERAL_OEM_CUSTOM_VEHICLE_DATA_NAME)); } - + + @Test public void testJson() { JSONObject reference = new JSONObject(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnWayPointChangeTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnWayPointChangeTests.java index 9d1382ed8..efdd3eba0 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnWayPointChangeTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/notifications/OnWayPointChangeTests.java @@ -12,10 +12,15 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; + /** * Created by austinkirk on 6/7/17. */ @@ -68,6 +73,7 @@ public class OnWayPointChangeTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<LocationDetails> list = ((OnWayPointChange) msg).getWayPoints(); 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 d8115510f..53edea6d4 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 @@ -14,9 +14,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static org.junit.Assert.assertNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -65,6 +72,7 @@ public class AddCommandTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int testCmdId = ( (AddCommand) msg ).getCmdID(); @@ -98,8 +106,9 @@ public class AddCommandTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 d936a3fe5..bdb666303 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 @@ -14,9 +14,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.AddSubMenu} @@ -66,6 +74,7 @@ public class AddSubmenuTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int testMenuId = ( (AddSubMenu) msg ).getMenuID(); @@ -97,8 +106,9 @@ public class AddSubmenuTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 656356140..b47d79c33 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 @@ -15,11 +15,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.AlertManeuver} @@ -63,6 +71,7 @@ public class AlertManeuverTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<TTSChunk> testTtsChunks = ( (AlertManeuver) msg ).getTtsChunks(); @@ -84,8 +93,9 @@ public class AlertManeuverTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 3db87cb5a..9b59ac694 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 @@ -16,11 +16,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.Alert} @@ -80,6 +88,7 @@ public class AlertTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int testDuration = ( (Alert) msg ).getDuration(); @@ -125,8 +134,9 @@ public class AlertTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 7f51fd0ab..783f67218 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 @@ -14,9 +14,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.ButtonPress} @@ -64,6 +71,7 @@ public class ButtonPressTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values ModuleType testModuleType = ( (ButtonPress) msg ).getModuleType(); @@ -91,8 +99,9 @@ public class ButtonPressTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 dea479494..97a0aacfb 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 @@ -45,9 +45,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.CancelInteraction} @@ -89,6 +96,7 @@ public class CancelInteractionTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Integer testFunctionID = ((CancelInteraction) msg).getInteractionFunctionID(); @@ -110,8 +118,9 @@ public class CancelInteractionTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 8404f3b47..b47224c1a 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.ChangeRegistration} @@ -58,6 +65,7 @@ public class ChangeRegistrationTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Language testLanguage = ( (ChangeRegistration) msg ).getLanguage(); @@ -79,8 +87,9 @@ public class ChangeRegistrationTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 19ba24ba0..763fe9ea9 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 @@ -45,9 +45,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; 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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.CloseApplication} @@ -77,6 +83,7 @@ public class CloseApplicationTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests CloseApplication msg = new CloseApplication(); @@ -87,8 +94,9 @@ public class CloseApplicationTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 b36d5c823..5ee659f28 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 @@ -14,10 +14,18 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.CreateInteractionChoiceSet} @@ -61,6 +69,7 @@ public class CreateInteractionChoiceSetTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int testCmdId = ( (CreateInteractionChoiceSet) msg ).getInteractionChoiceSetID(); @@ -85,8 +94,9 @@ public class CreateInteractionChoiceSetTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 f0aaf1bcd..17e383c3f 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.CreateWindow} @@ -64,6 +71,7 @@ public class CreateWindowTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues() { // Test Values int testWindowID = ((CreateWindow) msg).getWindowID(); @@ -94,8 +102,9 @@ public class CreateWindowTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 ae901cede..cc4d317b3 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 @@ -11,9 +11,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.DeleteCommand} @@ -55,6 +62,7 @@ public class DeleteCommandTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int cmdId = ( (DeleteCommand) msg ).getCmdID(); @@ -73,8 +81,9 @@ public class DeleteCommandTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 cf1dec131..5b15d08c8 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 @@ -11,9 +11,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.DeleteFile} @@ -55,6 +62,7 @@ public class DeleteFileTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String testFilename = ( (DeleteFile) msg ).getSdlFileName(); @@ -73,8 +81,9 @@ public class DeleteFileTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 47f9b1b1a..48b134366 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 @@ -11,9 +11,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.DeleteInteractionChoiceSet} @@ -55,6 +62,7 @@ public class DeleteInteractionChoiceSetTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int testChoiceSetId = ( (DeleteInteractionChoiceSet) msg ).getInteractionChoiceSetID(); @@ -73,8 +81,9 @@ public class DeleteInteractionChoiceSetTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 f6929a4cd..dcf518107 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 @@ -11,8 +11,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -55,6 +61,7 @@ public class DeleteSubMenuTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int testMenuId = ( (DeleteSubMenu) msg ).getMenuID(); @@ -73,8 +80,9 @@ public class DeleteSubMenuTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 378496ca9..39cf0bc86 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 @@ -11,8 +11,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -55,6 +61,7 @@ public class DeleteWindowTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues() { // Test Values int testWindowID = ((DeleteWindow) msg).getWindowID(); @@ -73,8 +80,9 @@ public class DeleteWindowTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 8063f08a3..05eb83e53 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 @@ -12,10 +12,18 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.DiagnosticMessage} @@ -61,6 +69,7 @@ public class DiagnosticMessageTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int testTargetId = ( (DiagnosticMessage) msg ).getTargetID(); @@ -89,8 +98,9 @@ public class DiagnosticMessageTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 f845ec6a4..3940d0170 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 @@ -11,8 +11,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; /** * Created by austinkirk on 6/6/17. @@ -57,6 +63,7 @@ public class DialNumberTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String testNumber = ((DialNumber) msg).getNumber(); @@ -74,8 +81,9 @@ public class DialNumberTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 83c5e7fe7..0421bc848 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 @@ -11,9 +11,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; 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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.EndAudioPassThru} @@ -43,6 +49,7 @@ public class EndAudioPassThruTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests EndAudioPassThru msg = new EndAudioPassThru(); @@ -53,8 +60,9 @@ public class EndAudioPassThruTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 d75bf818c..d94a1e143 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 @@ -11,9 +11,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + public class GetAppServiceDataTests extends BaseRpcTests { @Override @@ -50,6 +57,7 @@ public class GetAppServiceDataTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String serviceType = ( (GetAppServiceData) msg ).getServiceType(); @@ -71,6 +79,7 @@ public class GetAppServiceDataTests extends BaseRpcTests { /** * Tests constructor with required params */ + @Test public void testRequiredParamsConstructor () { GetAppServiceData msg = new GetAppServiceData(TestValues.GENERAL_STRING); @@ -82,8 +91,9 @@ public class GetAppServiceDataTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetCloudAppPropertiesTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetCloudAppPropertiesTests.java index d100d0672..ad8238056 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetCloudAppPropertiesTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/GetCloudAppPropertiesTests.java @@ -9,6 +9,8 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import static junit.framework.TestCase.fail; + public class GetCloudAppPropertiesTests extends BaseRpcTests { @Override 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 89ccf6359..7282966e6 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 @@ -11,9 +11,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.GetDTCs} @@ -57,6 +64,7 @@ public class GetDTCsTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int testDtcMask = ( (GetDTCs) msg ).getDtcMask(); @@ -78,8 +86,9 @@ public class GetDTCsTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 59ff1f516..de678fc58 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + public class GetFileTests extends BaseRpcTests { @@ -61,6 +68,7 @@ public class GetFileTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String fileName = ( (GetFile) msg ).getFileName(); @@ -91,6 +99,7 @@ public class GetFileTests extends BaseRpcTests { /** * Tests constructor with required params */ + @Test public void testRequiredParamsConstructor () { GetFile msg = new GetFile(TestValues.GENERAL_STRING); @@ -102,8 +111,9 @@ public class GetFileTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 5d40d255d..a79c54c27 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 @@ -12,9 +12,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; public class GetInteriorVehicleDataConsentTests extends BaseRpcTests { @@ -48,6 +54,7 @@ public class GetInteriorVehicleDataConsentTests extends BaseRpcTests { return RPCMessage.KEY_REQUEST; } + @Test public void testRpcValues() { ModuleType type = ((GetInteriorVehicleDataConsent) msg).getModuleType(); List<String> ids = ((GetInteriorVehicleDataConsent) msg).getModuleIds(); @@ -68,8 +75,9 @@ public class GetInteriorVehicleDataConsentTests extends BaseRpcTests { } + @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 c0c92e867..12a2e3d4c 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.GetInteriorVehicleData} @@ -60,6 +67,7 @@ public class GetInteriorVehicleDataTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values ModuleType testModuleType = ( (GetInteriorVehicleData) msg ).getModuleType(); @@ -84,8 +92,9 @@ public class GetInteriorVehicleDataTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 87269b70f..34e8d084c 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + public class GetSystemCapabilityTests extends BaseRpcTests { @Override @@ -54,6 +61,7 @@ public class GetSystemCapabilityTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values SystemCapabilityType testType = ( (GetSystemCapability) msg ).getSystemCapabilityType(); @@ -75,8 +83,9 @@ public class GetSystemCapabilityTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 dbd5e30bc..e0ccf50ee 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 @@ -11,9 +11,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.GetVehicleData} @@ -113,6 +121,7 @@ public class GetVehicleDataTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Valid Tests assertTrue(TestValues.TRUE, ( (GetVehicleData) msg ).getSpeed()); @@ -187,8 +196,9 @@ public class GetVehicleDataTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 68a7a8caf..b3683206b 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * Created by austinkirk on 6/6/17. */ @@ -55,6 +62,7 @@ public class GetWayPointsTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values WayPointType testType = ( (GetWayPoints) msg ).getWayPointType(); @@ -73,8 +81,9 @@ public class GetWayPointsTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 dfca109a3..0c1c642ef 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 @@ -11,9 +11,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; 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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.ListFiles} @@ -43,6 +49,7 @@ public class ListFilesTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests ListFiles msg = new ListFiles(); @@ -53,8 +60,9 @@ public class ListFilesTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 3d9281c3f..3e8fb9069 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 @@ -11,9 +11,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + public class PerformAppServiceInteractionTests extends BaseRpcTests { @@ -58,6 +65,7 @@ public class PerformAppServiceInteractionTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String serviceUri = ( (PerformAppServiceInteraction) msg ).getServiceUri(); @@ -85,6 +93,7 @@ public class PerformAppServiceInteractionTests extends BaseRpcTests { /** * Tests constructor with required params */ + @Test public void testRequiredParamsConstructor () { // test with param in constructor PerformAppServiceInteraction msg = new PerformAppServiceInteraction(TestValues.GENERAL_STRING, TestValues.GENERAL_STRING, TestValues.GENERAL_STRING); @@ -99,8 +108,9 @@ public class PerformAppServiceInteractionTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 19d65f6e5..28cb20eff 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 @@ -17,11 +17,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.PerformAudioPassThru} @@ -76,6 +84,7 @@ public class PerformAudioPassThruTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values boolean testMuteAudio = ( (PerformAudioPassThru) msg ).getMuteAudio(); @@ -118,8 +127,9 @@ public class PerformAudioPassThruTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 6b0060e13..088f9ad62 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 @@ -17,11 +17,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.PerformInteraction} @@ -81,6 +89,7 @@ public class PerformInteractionTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<TTSChunk> testInitialPrompt = ( (PerformInteraction) msg).getInitialPrompt(); @@ -127,8 +136,9 @@ public class PerformInteractionTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 8a1443537..9049a171c 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 @@ -13,9 +13,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + public class PublishAppServiceTests extends BaseRpcTests { @Override @@ -51,6 +59,7 @@ public class PublishAppServiceTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values AppServiceManifest copy = ( (PublishAppService) msg ).getAppServiceManifest(); @@ -69,6 +78,7 @@ public class PublishAppServiceTests extends BaseRpcTests { /** * Tests constructor with required params */ + @Test public void testRequiredParamsConstructor () { PublishAppService msg = new PublishAppService(TestValues.GENERAL_APPSERVICEMANIFEST); @@ -80,8 +90,9 @@ public class PublishAppServiceTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 3b6eb297b..b3fe612e3 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 @@ -12,10 +12,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.zip.CRC32; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.PutFile} @@ -68,6 +75,7 @@ public class PutFileTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values FileType testFileType = ( (PutFile) msg ).getFileType(); @@ -101,6 +109,7 @@ public class PutFileTests extends BaseRpcTests { /** * Tests the expected values of the CRC checksum. */ + @Test public void testByteArrayCheckSum () { // Test Values PutFile msgCRC = new PutFile(); @@ -119,8 +128,9 @@ public class PutFileTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 0e1231886..f1b4b02b0 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 @@ -12,10 +12,18 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.ReadDID} @@ -59,6 +67,7 @@ public class ReadDidTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Integer testEcuName = ( (ReadDID) msg ).getEcuName(); @@ -80,8 +89,9 @@ public class ReadDidTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 c4351743a..8741eda76 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 @@ -20,11 +20,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.RegisterAppInterface} @@ -95,6 +103,7 @@ public class RegisterAppInterfaceTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values SdlMsgVersion testVersion = ( (RegisterAppInterface) msg).getSdlMsgVersion(); @@ -158,8 +167,9 @@ public class RegisterAppInterfaceTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 4f8570c25..7fe5194d2 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + public class ReleaseInteriorVehicleDataModuleTests extends BaseRpcTests { @Override @@ -47,6 +54,7 @@ public class ReleaseInteriorVehicleDataModuleTests extends BaseRpcTests { return RPCMessage.KEY_REQUEST; } + @Test public void testRpcValues() { ModuleType type = ((ReleaseInteriorVehicleDataModule) msg).getModuleType(); String id = ((ReleaseInteriorVehicleDataModule) msg).getModuleId(); @@ -65,8 +73,9 @@ public class ReleaseInteriorVehicleDataModuleTests extends BaseRpcTests { assertEquals(TestValues.MATCH, TestValues.GENERAL_MODULETYPE, msg2.getModuleType()); } + @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 2ae30e8d8..616f429fa 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 @@ -13,10 +13,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.ResetGlobalProperties} @@ -58,6 +65,7 @@ public class ResetGlobalPropertiesTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<GlobalProperty> copy = ( (ResetGlobalProperties) msg ).getProperties(); @@ -79,8 +87,9 @@ public class ResetGlobalPropertiesTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 a814d33a9..7e462367a 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 @@ -14,11 +14,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.ScrollableMessage} @@ -66,6 +74,7 @@ public class ScrollableMessageTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String testBody = ( (ScrollableMessage) msg ).getScrollableMessageBody(); @@ -97,8 +106,9 @@ public class ScrollableMessageTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SendHapticDataTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SendHapticDataTests.java index 556bcdc6e..090818308 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SendHapticDataTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SendHapticDataTests.java @@ -11,10 +11,15 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; + /** * Created by brettywhite on 8/9/17. */ @@ -68,6 +73,7 @@ public class SendHapticDataTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<HapticRect> list = msg.getHapticRectData(); 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 e530677e6..5aad3a782 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 @@ -13,10 +13,18 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.SendLocation} @@ -70,6 +78,7 @@ public class SendLocationTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Double latitude = ((SendLocation) msg).getLatitudeDegrees(); @@ -106,8 +115,9 @@ public class SendLocationTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 bff9650fe..56cb3e4a1 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 @@ -11,9 +11,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.SetAppIcon} @@ -55,6 +62,7 @@ public class SetAppIconTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String copy = ( (SetAppIcon) msg ).getSdlFileName(); @@ -73,8 +81,9 @@ public class SetAppIconTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetCloudAppPropertiesTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetCloudAppPropertiesTests.java index b7121ee2f..2db06fa01 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetCloudAppPropertiesTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/SetCloudAppPropertiesTests.java @@ -9,6 +9,8 @@ import com.smartdevicelink.test.TestValues; import org.json.JSONException; import org.json.JSONObject; +import static junit.framework.TestCase.fail; + public class SetCloudAppPropertiesTests extends BaseRpcTests { @Override 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 b67f06152..438634d38 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 @@ -13,9 +13,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : @@ -62,6 +70,7 @@ public class SetDisplayLayoutTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String testDisplayLayout = ( (SetDisplayLayout) msg ).getDisplayLayout(); @@ -86,8 +95,9 @@ public class SetDisplayLayoutTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 13020e26e..d041e9a19 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 @@ -18,11 +18,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.SetGlobalProperties} @@ -78,6 +86,7 @@ public class SetGlobalPropertiesTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Image testImage = ( (SetGlobalProperties) msg ).getMenuIcon(); @@ -117,8 +126,9 @@ public class SetGlobalPropertiesTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 2e448d521..f0855e43e 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 @@ -13,9 +13,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.SetInteriorVehicleData} @@ -57,6 +65,7 @@ public class SetInteriorVehicleDataTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values ModuleData testModuleData = ( (SetInteriorVehicleData) msg ).getModuleData(); @@ -75,8 +84,9 @@ public class SetInteriorVehicleDataTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 b11554704..76d5fc588 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 @@ -15,9 +15,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.SetMediaClockTimer} @@ -65,6 +73,7 @@ public class SetMediaClockTimerTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values StartTime testStartTime = ( (SetMediaClockTimer) msg ).getStartTime(); @@ -92,6 +101,7 @@ public class SetMediaClockTimerTests extends BaseRpcTests { /** * Test static initializers */ + @Test public void testInitializers(){ Integer timeInterval1 = 5000; StartTime startTime1 = new StartTime(timeInterval1); @@ -157,8 +167,9 @@ public class SetMediaClockTimerTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 2bec40ca6..81fa29a72 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 @@ -46,9 +46,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.ShowAppMenu} @@ -88,6 +95,7 @@ public class ShowAppMenuTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Integer copy = ( (ShowAppMenu) msg ).getMenuID(); @@ -106,8 +114,9 @@ public class ShowAppMenuTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 0ec2100d2..82fe4bb1f 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 @@ -15,11 +15,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.ShowConstantTbt} @@ -81,6 +89,7 @@ public class ShowConstantTbtTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Double testScale = ((ShowConstantTbt) msg).getDistanceToManeuverScale(); @@ -129,8 +138,9 @@ public class ShowConstantTbtTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 4d9d7843c..b4264adf2 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 @@ -18,11 +18,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.Show} @@ -89,6 +97,7 @@ public class ShowTests extends BaseRpcTests { return result; } + @Test public void testSoftButtons () { // TestValues String testTrack = ( (Show) msg ).getMediaTrack(); @@ -145,8 +154,9 @@ public class ShowTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext,getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(),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 e1c164fc9..36a2b0b14 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 @@ -12,10 +12,18 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.Slider} @@ -67,6 +75,7 @@ public class SliderTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Integer testNumTicks = ( (Slider) msg ).getNumTicks(); @@ -100,8 +109,9 @@ public class SliderTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 fb49eef50..1a42c9cc1 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 @@ -14,11 +14,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + public class SpeakTests extends BaseRpcTests { @Override @@ -56,6 +64,7 @@ public class SpeakTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<TTSChunk> copy = ( (Speak) msg ).getTtsChunks(); @@ -74,8 +83,9 @@ public class SpeakTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 133dc29b1..b33dd6e39 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 @@ -12,8 +12,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -56,6 +62,7 @@ public class SubscribeButtonTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values ButtonName testButtonName = ( (SubscribeButton) msg ).getButtonName(); @@ -74,8 +81,9 @@ public class SubscribeButtonTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 ea46c975a..cfcb7aae7 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 @@ -11,9 +11,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.SubscribeVehicleData} @@ -111,6 +119,7 @@ public class SubscribeVehicleDataTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Valid Tests @@ -183,8 +192,9 @@ public class SubscribeVehicleDataTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 7d3b77520..7b43fd429 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 @@ -11,9 +11,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; 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; + /** * Created by austinkirk on 6/7/17. */ @@ -42,6 +48,7 @@ public class SubscribeWayPointsTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SubscribeWayPoints msg = new SubscribeWayPoints(); @@ -52,8 +59,9 @@ public class SubscribeWayPointsTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 217385966..89dff378b 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 @@ -13,10 +13,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.SystemRequest} @@ -64,6 +73,7 @@ public class SystemRequestTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values RequestType testRequestType = ( (SystemRequest) msg ).getRequestType(); @@ -92,8 +102,9 @@ public class SystemRequestTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 6c9a3117d..a1a5ad3b3 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 @@ -46,9 +46,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.UnpublishAppService} @@ -88,6 +95,7 @@ public class UnpublishAppServiceTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String copy = ( (UnpublishAppService) msg ).getServiceID(); @@ -106,6 +114,7 @@ public class UnpublishAppServiceTests extends BaseRpcTests { /** * Tests constructor with required params */ + @Test public void testRequiredParamsConstructor () { UnpublishAppService msg = new UnpublishAppService(TestValues.GENERAL_STRING); @@ -117,8 +126,9 @@ public class UnpublishAppServiceTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 603dfb2a6..b0d61bff4 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 @@ -11,9 +11,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; 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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.UnregisterAppInterface} @@ -43,6 +49,7 @@ public class UnregisterAppInterfaceTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests UnregisterAppInterface msg = new UnregisterAppInterface(); @@ -53,8 +60,9 @@ public class UnregisterAppInterfaceTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 bce9fd806..94ff33f43 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.UnsubscribeButton} @@ -57,6 +64,7 @@ public class UnsubscribeButtonTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values ButtonName testButtonName = ( (UnsubscribeButton) msg ).getButtonName(); @@ -75,8 +83,9 @@ public class UnsubscribeButtonTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 464131aed..a26c784fd 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 @@ -12,9 +12,18 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.UnsubscribeVehicleData} @@ -114,6 +123,7 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues(){ // Valid Tests assertTrue(TestValues.TRUE,( (UnsubscribeVehicleData) msg ).getSpeed()); @@ -187,8 +197,9 @@ public class UnsubscribeVehicleDataTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 f8bf0a332..dee3f0d26 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 @@ -11,8 +11,13 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.fail; /** * Created by austinkirk on 6/7/17. @@ -42,6 +47,7 @@ public class UnsubscribeWayPointsTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests UnsubscribeWayPoints msg = new UnsubscribeWayPoints(); @@ -52,8 +58,9 @@ public class UnsubscribeWayPointsTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 4591cb40a..82d3f7502 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 @@ -15,11 +15,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.UpdateTurnList} @@ -63,6 +71,7 @@ public class UpdateTurnListTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<SoftButton> testSoftButtonList = ( (UpdateTurnList) msg ).getSoftButtons(); @@ -87,8 +96,9 @@ public class UpdateTurnListTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 09f8443a6..bb500ef84 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 @@ -12,8 +12,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -44,6 +48,7 @@ public class AddCommandResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests AddCommandResponse msg = new AddCommandResponse(); @@ -54,8 +59,9 @@ public class AddCommandResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 e178b36aa..b8962b117 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class AddSubmenuResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests AddSubMenuResponse msg = new AddSubMenuResponse(); @@ -53,8 +58,9 @@ public class AddSubmenuResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 153b44197..4de247c89 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class AlertManeuverResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests AlertManeuverResponse msg = new AlertManeuverResponse(); @@ -53,8 +58,9 @@ public class AlertManeuverResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 2b48cd9f8..61dd14116 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 @@ -11,9 +11,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.AlertResponse} @@ -55,6 +62,7 @@ public class AlertResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int tryAgainTime = ( (AlertResponse) msg ).getTryAgainTime(); @@ -73,8 +81,9 @@ public class AlertResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ButtonPressResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ButtonPressResponseTest.java index bb12d2515..25b8140c4 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ButtonPressResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ButtonPressResponseTest.java @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class ButtonPressResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests ButtonPressResponse msg = new ButtonPressResponse(); @@ -53,8 +58,9 @@ public class ButtonPressResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CancelInteractionResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CancelInteractionResponseTests.java index f24b74317..682496704 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 @@ -45,8 +45,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -77,6 +81,7 @@ public class CancelInteractionResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests CancelInteractionResponse msg = new CancelInteractionResponse(); @@ -87,8 +92,9 @@ public class CancelInteractionResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 76bc24852..69c9e44ee 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 @@ -11,9 +11,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.ChangeRegistrationResponse} @@ -43,6 +48,7 @@ public class ChangeRegistrationResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests ChangeRegistrationResponse msg = new ChangeRegistrationResponse(); @@ -53,8 +59,9 @@ public class ChangeRegistrationResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CloseApplicationResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CloseApplicationResponseTests.java index 3c3b2446f..9bf867391 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CloseApplicationResponseTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CloseApplicationResponseTests.java @@ -45,8 +45,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -77,6 +81,7 @@ public class CloseApplicationResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests CloseApplicationResponse msg = new CloseApplicationResponse(); @@ -87,8 +92,9 @@ public class CloseApplicationResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateInteractionChoiceSetResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateInteractionChoiceSetResponseTests.java index a15af8fd8..a64d12236 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateInteractionChoiceSetResponseTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateInteractionChoiceSetResponseTests.java @@ -7,6 +7,9 @@ import com.smartdevicelink.test.BaseRpcTests; import com.smartdevicelink.test.TestValues; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -37,6 +40,7 @@ public class CreateInteractionChoiceSetResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests CreateInteractionChoiceSetResponse msg = new CreateInteractionChoiceSetResponse(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateWindowResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateWindowResponseTest.java index 9d049429f..56e8fc257 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateWindowResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/CreateWindowResponseTest.java @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class CreateWindowResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues() { // Invalid/Null Tests CreateWindowResponse msg = new CreateWindowResponse(); @@ -53,8 +58,9 @@ public class CreateWindowResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteCommandResponseTests.java index fe2568eb5..2781d2189 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class DeleteCommandResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests DeleteCommandResponse msg = new DeleteCommandResponse(); @@ -53,8 +58,9 @@ public class DeleteCommandResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 1a8f1f951..ad0c5c6ea 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 @@ -11,8 +11,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -55,6 +61,7 @@ public class DeleteFileResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values int spaceAvailable = ( (DeleteFileResponse) msg ).getSpaceAvailable(); @@ -73,8 +80,9 @@ public class DeleteFileResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 6ab93240f..e624da646 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class DeleteInteractionChoiceSetResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests DeleteInteractionChoiceSetResponse msg = new DeleteInteractionChoiceSetResponse(); @@ -53,8 +58,9 @@ public class DeleteInteractionChoiceSetResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 f5b60143b..9d4c4673d 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class DeleteSubMenuResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests DeleteSubMenuResponse msg = new DeleteSubMenuResponse(); @@ -53,8 +58,9 @@ public class DeleteSubMenuResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteWindowResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteWindowResponseTest.java index 0cb7e8caa..bfa2df5aa 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteWindowResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DeleteWindowResponseTest.java @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class DeleteWindowResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues() { // Invalid/Null Tests DeleteWindowResponse msg = new DeleteWindowResponse(); @@ -53,8 +58,9 @@ public class DeleteWindowResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/DiagnosticMessageResponseTests.java index eb916bf5a..8fc7ebf69 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -59,6 +66,7 @@ public class DiagnosticMessageResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<Integer> cmdId = ( (DiagnosticMessageResponse) msg ).getMessageDataResult(); @@ -81,8 +89,9 @@ public class DiagnosticMessageResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 900444704..bf68f125a 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * Created by austinkirk on 6/6/17. @@ -43,6 +47,7 @@ public class DialNumberResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests DialNumberResponse msg = new DialNumberResponse(); @@ -53,8 +58,9 @@ public class DialNumberResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 8026ca756..cc7445da1 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class EndAudioPassThruResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests EndAudioPassThruResponse msg = new EndAudioPassThruResponse(); @@ -53,8 +58,9 @@ public class EndAudioPassThruResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GenericResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GenericResponseTests.java index 09e1c754a..1c9681e2e 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GenericResponseTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GenericResponseTests.java @@ -7,6 +7,9 @@ import com.smartdevicelink.test.BaseRpcTests; import com.smartdevicelink.test.TestValues; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -37,6 +40,7 @@ public class GenericResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests GenericResponse msg = new GenericResponse(); 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 ddd92ee22..17bc3efbf 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 @@ -12,8 +12,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -44,6 +48,7 @@ public class GetAppServiceDataResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests GetAppServiceDataResponse msg = new GetAppServiceDataResponse(); @@ -59,8 +64,9 @@ public class GetAppServiceDataResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetCloudAppPropertiesResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetCloudAppPropertiesResponseTests.java index 571b91c99..b9d40f907 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetCloudAppPropertiesResponseTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetCloudAppPropertiesResponseTests.java @@ -7,6 +7,9 @@ import com.smartdevicelink.test.BaseRpcTests; import com.smartdevicelink.test.TestValues; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertNotNull; public class GetCloudAppPropertiesResponseTests extends BaseRpcTests { @Override @@ -32,6 +35,7 @@ public class GetCloudAppPropertiesResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests GetCloudAppPropertiesResponse msg = new GetCloudAppPropertiesResponse(); 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 f87de7e50..ca7ee54ba 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 @@ -12,10 +12,18 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.GetDTCsResponse} @@ -57,6 +65,7 @@ public class GetDTCsResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<String> cmdId = ( (GetDTCsResponse) msg ).getDtc(); @@ -79,8 +88,9 @@ public class GetDTCsResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 815f4e400..f5c67ed35 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 @@ -12,9 +12,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.GetFileResponse} @@ -63,6 +71,7 @@ public class GetFileResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Integer crc = ( (GetFileResponse) msg ).getCRC(); @@ -90,8 +99,9 @@ public class GetFileResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataConsentResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataConsentResponseTests.java index 2d1ee88c7..48cea8f69 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataConsentResponseTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataConsentResponseTests.java @@ -12,9 +12,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; public class GetInteriorVehicleDataConsentResponseTests extends BaseRpcTests { @@ -47,19 +53,22 @@ public class GetInteriorVehicleDataConsentResponseTests extends BaseRpcTests { return result; } + @Test public void testRpcValues() { List<Boolean> list = ((GetInteriorVehicleDataConsentResponse) msg).getAllowances(); assertEquals(TestValues.MATCH, list, TestValues.GENERAL_BOOLEAN_LIST); } + @Test public void testRequiredParams(){ GetInteriorVehicleDataConsentResponse msg = new GetInteriorVehicleDataConsentResponse(true, Result.SUCCESS); assertTrue(msg.getSuccess()); assertEquals(TestValues.MATCH, msg.getResultCode(), Result.SUCCESS); } + @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/GetInteriorVehicleDataResponseTests.java index f64325dea..dc1818180 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 @@ -13,8 +13,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -60,6 +67,7 @@ public class GetInteriorVehicleDataResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values boolean testIsSubscribed = ( (GetInteriorVehicleDataResponse) msg ).getIsSubscribed(); @@ -81,8 +89,9 @@ public class GetInteriorVehicleDataResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 d18e89350..28d267b5d 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 @@ -12,9 +12,16 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +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; + public class GetSystemCapabilityResponseTests extends BaseRpcTests { @Override @@ -52,6 +59,7 @@ public class GetSystemCapabilityResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values SystemCapability testCapability = ( (GetSystemCapabilityResponse) msg ).getSystemCapability(); @@ -70,8 +78,9 @@ public class GetSystemCapabilityResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 71eeed435..ec3457f5e 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 @@ -28,12 +28,20 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.Iterator; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : @@ -98,6 +106,7 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{ return result; } + @Test public void testJson() { JSONObject reference = new JSONObject(); @@ -419,10 +428,11 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{ fail(TestValues.JSON_FAIL); } } - + /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues(){ // Valid Tests assertEquals(TestValues.MATCH, VehicleDataHelper.SPEED, ( (GetVehicleDataResponse) msg ).getSpeed()); @@ -493,8 +503,9 @@ public class GetVehicleDataResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 0ff0e1260..21c401c82 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 @@ -13,10 +13,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +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 junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; /** * Created by austinkirk on 6/6/17. @@ -71,6 +76,7 @@ public class GetWayPointsResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values @@ -90,8 +96,9 @@ public class GetWayPointsResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 890aa2753..e7c7fb794 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 @@ -12,10 +12,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.ListFilesResponse} @@ -59,6 +68,7 @@ public class ListFilesResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<String> filenames = ( (ListFilesResponse) msg ).getFilenames(); @@ -81,8 +91,9 @@ public class ListFilesResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 7665f214b..bdf3e61be 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 @@ -11,8 +11,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : @@ -56,6 +63,7 @@ public class PerformAppServiceInteractionResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values String serviceSpecificResult = ( (PerformAppServiceInteractionResponse) msg ).getServiceSpecificResult(); @@ -74,8 +82,9 @@ public class PerformAppServiceInteractionResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java index ae7436d63..3fb489fca 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformAudioPassThruResponseTest.java @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class PerformAudioPassThruResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests PerformAudioPassThruResponse msg = new PerformAudioPassThruResponse(); @@ -53,8 +58,9 @@ public class PerformAudioPassThruResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java index 94acc21c5..dd81627b4 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PerformInteractionResponseTest.java @@ -12,8 +12,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -60,6 +66,7 @@ public class PerformInteractionResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Integer testId = ( (PerformInteractionResponse) msg).getChoiceID(); @@ -84,8 +91,9 @@ public class PerformInteractionResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PublishAppServiceResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PublishAppServiceResponseTests.java index ed84ac722..8b5c024df 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 @@ -13,9 +13,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.PublishAppServiceResponse} @@ -58,6 +66,7 @@ public class PublishAppServiceResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values AppServiceRecord testRecord = ( (PublishAppServiceResponse) msg ).getServiceRecord(); @@ -76,8 +85,9 @@ public class PublishAppServiceResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java index b8e36b578..90faa7291 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/PutFileResponseTest.java @@ -11,8 +11,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -55,6 +61,7 @@ public class PutFileResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values Integer testSpace = ( (PutFileResponse) msg ).getSpaceAvailable(); @@ -73,8 +80,9 @@ public class PutFileResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java index f11b21140..5948eb3f5 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReadDIDResponseTest.java @@ -14,10 +14,18 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +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 junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : @@ -60,6 +68,7 @@ public class ReadDIDResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<DIDResult> testResults = ( (ReadDIDResponse) msg ).getDidResult(); @@ -78,8 +87,9 @@ public class ReadDIDResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java index f2edaa592..4a12bc5b3 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/RegisterAppInterfaceResponseTest.java @@ -25,11 +25,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.RegisterAppInterfaceResponse} @@ -102,6 +110,7 @@ public class RegisterAppInterfaceResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values List<Integer> testSupportedDiagModes = ( (RegisterAppInterfaceResponse) msg ).getSupportedDiagModes(); @@ -165,8 +174,9 @@ public class RegisterAppInterfaceResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReleaseInteriorVehicleDataModuleResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ReleaseInteriorVehicleDataModuleResponseTests.java index 60c567656..f99af82d5 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 @@ -11,8 +11,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.fail; + public class ReleaseInteriorVehicleDataModuleResponseTests extends BaseRpcTests { @Override @@ -36,8 +42,9 @@ public class ReleaseInteriorVehicleDataModuleResponseTests extends BaseRpcTests return new JSONObject(); } + @Test public void testJsonConstructor() { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 710da67cb..9763f48b6 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class ResetGlobalPropertiesResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests ResetGlobalPropertiesResponse msg = new ResetGlobalPropertiesResponse(); @@ -53,8 +58,9 @@ public class ResetGlobalPropertiesResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java index 709c915a0..e7ec116d4 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ScrollableMessageResponseTest.java @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class ScrollableMessageResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests ScrollableMessageResponse msg = new ScrollableMessageResponse(); @@ -53,8 +58,9 @@ public class ScrollableMessageResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SendLocationResponseTests.java index 305e8bdb3..f01be86d1 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -44,6 +48,7 @@ public class SendLocationResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SendLocationResponse msg = new SendLocationResponse(); @@ -54,8 +59,9 @@ public class SendLocationResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java index b2f0fd696..dd850f46b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetAppIconResponseTest.java @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class SetAppIconResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SetAppIconResponse msg = new SetAppIconResponse(); @@ -53,8 +58,9 @@ public class SetAppIconResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetCloudAppPropertiesResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetCloudAppPropertiesResponseTests.java index dec748b32..f6558ab5a 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetCloudAppPropertiesResponseTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetCloudAppPropertiesResponseTests.java @@ -7,6 +7,9 @@ import com.smartdevicelink.test.BaseRpcTests; import com.smartdevicelink.test.TestValues; import org.json.JSONObject; +import org.junit.Test; + +import static junit.framework.TestCase.assertNotNull; public class SetCloudAppPropertiesResponseTests extends BaseRpcTests { @Override @@ -32,6 +35,7 @@ public class SetCloudAppPropertiesResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SetCloudAppPropertiesResponse msg = new SetCloudAppPropertiesResponse(); diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java index f62412da3..b6e7be537 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetDisplayLayoutResponseTest.java @@ -17,11 +17,19 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONArray; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.ArrayList; import java.util.Hashtable; import java.util.List; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.SetDisplayLayoutResponse} @@ -69,6 +77,7 @@ public class SetDisplayLayoutResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values DisplayCapabilities testDisplay = ( (SetDisplayLayoutResponse) msg ).getDisplayCapabilities(); @@ -102,8 +111,9 @@ public class SetDisplayLayoutResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java index 91e4e12d9..04e099304 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetGlobalPropertiesResponseTest.java @@ -11,8 +11,13 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; + /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +48,7 @@ public class SetGlobalPropertiesResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SetGlobalPropertiesResponse msg = new SetGlobalPropertiesResponse(); @@ -53,8 +59,9 @@ public class SetGlobalPropertiesResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetInteriorVehicleDataResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetInteriorVehicleDataResponseTests.java index 7e2e09926..e04531c5f 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 @@ -13,9 +13,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.SetInteriorVehicleDataResponse} @@ -58,6 +66,7 @@ public class SetInteriorVehicleDataResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values ModuleData testModuleData = ( (SetInteriorVehicleDataResponse) msg ).getModuleData(); @@ -76,8 +85,9 @@ public class SetInteriorVehicleDataResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java index 726551e53..981f4e3f0 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SetMediaClockTimerResponseTest.java @@ -11,9 +11,14 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.SetMediaClockTimerResponse} @@ -43,6 +48,7 @@ public class SetMediaClockTimerResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SetMediaClockTimerResponse msg = new SetMediaClockTimerResponse(); @@ -53,8 +59,9 @@ public class SetMediaClockTimerResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowAppMenuResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowAppMenuResponseTests.java index 670e72d1c..198c45751 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 @@ -46,8 +46,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; public class ShowAppMenuResponseTests extends BaseRpcTests { @@ -74,6 +78,7 @@ public class ShowAppMenuResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests ShowAppMenuResponse msg = new ShowAppMenuResponse(); @@ -84,8 +89,9 @@ public class ShowAppMenuResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 82f0a6d4d..9a2c90ca4 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -44,6 +48,7 @@ public class ShowConstantTbtResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests ShowConstantTbtResponse msg = new ShowConstantTbtResponse(); @@ -54,8 +59,9 @@ public class ShowConstantTbtResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java index 7f18cf7a4..6e6140068 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/ShowResponseTest.java @@ -11,9 +11,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static android.support.test.InstrumentationRegistry.getContext; + + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.ShowResponse} @@ -43,6 +49,7 @@ public class ShowResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests ShowResponse msg = new ShowResponse(); @@ -53,8 +60,9 @@ public class ShowResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java index 72e55f4f9..8d288c73b 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SliderResponseTest.java @@ -11,8 +11,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : @@ -53,11 +60,13 @@ public class SliderResponseTest extends BaseRpcTests { return result; } + @Test public void testPosition() { Integer copy = ( (SliderResponse) msg ).getSliderPosition(); assertEquals(TestValues.MATCH, (Integer) TestValues.GENERAL_INT, copy); } + @Test public void testNull() { SliderResponse msg = new SliderResponse(); assertNotNull(TestValues.NOT_NULL, msg); @@ -70,8 +79,9 @@ public class SliderResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java index d96f20564..196c06f21 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SpeakResponseTest.java @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class SpeakResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SpeakResponse msg = new SpeakResponse(); @@ -53,8 +58,9 @@ public class SpeakResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/StreamRPCResponseTests.java index 3f3f3d25f..43195c80b 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 @@ -11,8 +11,13 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; + /** * Created by austinkirk on 6/7/17. @@ -54,6 +59,7 @@ public class StreamRPCResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests StreamRPCResponse msg = new StreamRPCResponse(); @@ -64,8 +70,9 @@ public class StreamRPCResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java index 4f64be431..023fd8869 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeButtonResponseTest.java @@ -11,9 +11,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static android.support.test.InstrumentationRegistry.getContext; + + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.SubscribeButtonResponse} @@ -43,6 +49,7 @@ public class SubscribeButtonResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SubscribeButtonResponse msg = new SubscribeButtonResponse(); @@ -53,8 +60,9 @@ public class SubscribeButtonResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java index bb7c1f90c..6694886d9 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SubscribeVehicleDataResponseTest.java @@ -14,9 +14,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.fail; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.SubscribeVehicleDataResponse} @@ -121,6 +129,7 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values VehicleDataResult testGps = ( (SubscribeVehicleDataResponse) msg ).getGps(); @@ -223,8 +232,9 @@ public class SubscribeVehicleDataResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 cda7546f3..2c0b24e99 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * Created by austinkirk on 6/7/17. @@ -42,6 +46,7 @@ public class SubscribeWaypointsResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SubscribeWayPointsResponse msg = new SubscribeWayPointsResponse(); @@ -52,8 +57,9 @@ public class SubscribeWaypointsResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java index 5c52ea0eb..3ccae2288 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/SystemRequestResponseTest.java @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class SystemRequestResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests SystemRequestResponse msg = new SystemRequestResponse(); @@ -53,8 +58,9 @@ public class SystemRequestResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnpublishAppServiceResponseTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnpublishAppServiceResponseTests.java index 0e4a1f81e..bc43cc1bf 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 @@ -46,8 +46,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -78,6 +82,7 @@ public class UnpublishAppServiceResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests UnpublishAppServiceResponse msg = new UnpublishAppServiceResponse(); @@ -88,8 +93,9 @@ public class UnpublishAppServiceResponseTests extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java index 3b4f02dbb..cb461a563 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnregisterAppInterfaceResponseTest.java @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class UnregisterAppInterfaceResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests UnregisterAppInterfaceResponse msg = new UnregisterAppInterfaceResponse(); @@ -53,8 +58,9 @@ public class UnregisterAppInterfaceResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java index 127c62572..afdedbdd0 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java @@ -11,9 +11,15 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static android.support.test.InstrumentationRegistry.getContext; + + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.rpc.UnsubscribeButtonResponse} @@ -43,6 +49,7 @@ public class UnsubscribeButtonResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests UnsubscribeButtonResponse msg = new UnsubscribeButtonResponse(); @@ -53,8 +60,9 @@ public class UnsubscribeButtonResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java index d13e1d539..f79b18b30 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeVehicleDataResponseTest.java @@ -16,9 +16,17 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; +import static junit.framework.TestCase.assertNull; +import static junit.framework.TestCase.assertTrue; +import static junit.framework.TestCase.fail; +import static android.support.test.InstrumentationRegistry.getContext; + /** * This is a unit test class for the SmartDeviceLink library project class : * {@link com.smartdevicelink.proxy.rpc.UnsubscribeVehicleDataResponse} @@ -123,6 +131,7 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Test Values VehicleDataResult testGps = ( (UnsubscribeVehicleDataResponse) msg ).getGps(); @@ -225,8 +234,9 @@ public class UnsubscribeVehicleDataResponseTest extends BaseRpcTests { /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 644191bdf..6c9c503f8 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * Created by austinkirk on 6/7/17. @@ -42,6 +46,7 @@ public class UnsubscribeWayPointsResponseTests extends BaseRpcTests{ /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests UnsubscribeWayPointsResponse msg = new UnsubscribeWayPointsResponse(); @@ -52,8 +57,9 @@ public class UnsubscribeWayPointsResponseTests extends BaseRpcTests{ /** * Tests a valid JSON construction of this RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), 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 c209687bb..0db5a943c 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 @@ -11,8 +11,12 @@ import com.smartdevicelink.test.json.rpc.JsonFileReader; import org.json.JSONException; import org.json.JSONObject; +import org.junit.Test; import java.util.Hashtable; +import static android.support.test.InstrumentationRegistry.getContext; +import static junit.framework.TestCase.assertEquals; +import static junit.framework.TestCase.assertNotNull; /** * This is a unit test class for the SmartDeviceLink library project class : @@ -43,6 +47,7 @@ public class UpdateTurnListResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testRpcValues () { // Invalid/Null Tests UpdateTurnListResponse msg = new UpdateTurnListResponse(); @@ -53,8 +58,9 @@ public class UpdateTurnListResponseTests extends BaseRpcTests { /** * Tests the expected values of the RPC message. */ + @Test public void testJsonConstructor () { - JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType()); + JSONObject commandJson = JsonFileReader.readId(getContext(), getCommandType(), getMessageType()); assertNotNull(TestValues.NOT_NULL, commandJson); try { |