summaryrefslogtreecommitdiff
path: root/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java')
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/AlertManeuverResponseTests.java82
1 files changed, 41 insertions, 41 deletions
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 44149d663..b7caed595 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
@@ -20,37 +20,37 @@ import static junit.framework.TestCase.assertEquals;
import static junit.framework.TestCase.assertNotNull;
/**
- * This is a unit test class for the SmartDeviceLink library project class :
+ * This is a unit test class for the SmartDeviceLink library project class :
* {@link com.smartdevicelink.proxy.rpc.AlertManeuverResponse}
*/
public class AlertManeuverResponseTests extends BaseRpcTests {
- @Override
- protected RPCMessage createMessage() {
- return new AlertManeuverResponse();
- }
+ @Override
+ protected RPCMessage createMessage() {
+ return new AlertManeuverResponse();
+ }
+
+ @Override
+ protected String getMessageType() {
+ return RPCMessage.KEY_RESPONSE;
+ }
- @Override
- protected String getMessageType() {
- return RPCMessage.KEY_RESPONSE;
- }
+ @Override
+ protected String getCommandType() {
+ return FunctionID.ALERT_MANEUVER.toString();
+ }
- @Override
- protected String getCommandType() {
- return FunctionID.ALERT_MANEUVER.toString();
- }
+ @Override
+ protected JSONObject getExpectedParameters(int sdlVersion) {
+ return new JSONObject();
+ }
- @Override
- protected JSONObject getExpectedParameters(int sdlVersion) {
- return new JSONObject();
- }
-
- /**
- * Tests the expected values of the RPC message.
- */
- @Test
- public void testRpcValues () {
- // Invalid/Null Tests
+ /**
+ * Tests the expected values of the RPC message.
+ */
+ @Test
+ public void testRpcValues() {
+ // Invalid/Null Tests
AlertManeuverResponse msg = new AlertManeuverResponse();
assertNotNull(TestValues.NOT_NULL, msg);
testNullBase(msg);
@@ -60,22 +60,22 @@ public class AlertManeuverResponseTests extends BaseRpcTests {
* Tests a valid JSON construction of this RPC message.
*/
@Test
- public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
- assertNotNull(TestValues.NOT_NULL, commandJson);
-
- try {
- Hashtable<String, Object> hash = JsonRPCMarshaller.deserializeJSONObject(commandJson);
- AlertManeuverResponse cmd = new AlertManeuverResponse(hash);
-
- JSONObject body = JsonUtils.readJsonObjectFromJsonObject(commandJson, getMessageType());
- assertNotNull(TestValues.NOT_NULL, body);
-
- // Test everything in the json body.
- assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(body, RPCMessage.KEY_FUNCTION_NAME), cmd.getFunctionName());
- assertEquals(TestValues.MATCH, JsonUtils.readIntegerFromJsonObject(body, RPCMessage.KEY_CORRELATION_ID), cmd.getCorrelationID());
- } catch (JSONException e) {
- e.printStackTrace();
- }
+ public void testJsonConstructor() {
+ JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getTargetContext(), getCommandType(), getMessageType());
+ assertNotNull(TestValues.NOT_NULL, commandJson);
+
+ try {
+ Hashtable<String, Object> hash = JsonRPCMarshaller.deserializeJSONObject(commandJson);
+ AlertManeuverResponse cmd = new AlertManeuverResponse(hash);
+
+ JSONObject body = JsonUtils.readJsonObjectFromJsonObject(commandJson, getMessageType());
+ assertNotNull(TestValues.NOT_NULL, body);
+
+ // Test everything in the json body.
+ assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(body, RPCMessage.KEY_FUNCTION_NAME), cmd.getFunctionName());
+ assertEquals(TestValues.MATCH, JsonUtils.readIntegerFromJsonObject(body, RPCMessage.KEY_CORRELATION_ID), cmd.getCorrelationID());
+ } catch (JSONException e) {
+ e.printStackTrace();
+ }
}
} \ No newline at end of file