summaryrefslogtreecommitdiff
path: root/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java')
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/responses/UnsubscribeButtonResponseTest.java58
1 files changed, 29 insertions, 29 deletions
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 348ffd95d..55d7b1e51 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
@@ -21,38 +21,38 @@ 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.UnsubscribeButtonResponse}
*/
public class UnsubscribeButtonResponseTest extends BaseRpcTests {
- @Override
- protected RPCMessage createMessage(){
+ @Override
+ protected RPCMessage createMessage() {
return new UnsubscribeButtonResponse();
}
@Override
- protected String getMessageType(){
+ protected String getMessageType() {
return RPCMessage.KEY_RESPONSE;
}
@Override
- protected String getCommandType(){
+ protected String getCommandType() {
return FunctionID.UNSUBSCRIBE_BUTTON.toString();
}
@Override
- protected JSONObject getExpectedParameters(int sdlVersion){
+ protected JSONObject getExpectedParameters(int sdlVersion) {
return new JSONObject();
}
/**
- * Tests the expected values of the RPC message.
- */
+ * Tests the expected values of the RPC message.
+ */
@Test
- public void testRpcValues () {
- // Invalid/Null Tests
- UnsubscribeButtonResponse msg = new UnsubscribeButtonResponse();
+ public void testRpcValues() {
+ // Invalid/Null Tests
+ UnsubscribeButtonResponse msg = new UnsubscribeButtonResponse();
assertNotNull(TestValues.NOT_NULL, msg);
testNullBase(msg);
}
@@ -61,22 +61,22 @@ public class UnsubscribeButtonResponseTest extends BaseRpcTests {
* Tests a valid JSON construction of this RPC message.
*/
@Test
- public void testJsonConstructor () {
- JSONObject commandJson = JsonFileReader.readId(getInstrumentation().getContext(), getCommandType(), getMessageType());
- assertNotNull(TestValues.NOT_NULL, commandJson);
-
- try {
- Hashtable<String, Object> hash = JsonRPCMarshaller.deserializeJSONObject(commandJson);
- UnsubscribeButtonResponse cmd = new UnsubscribeButtonResponse(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().getContext(), getCommandType(), getMessageType());
+ assertNotNull(TestValues.NOT_NULL, commandJson);
+
+ try {
+ Hashtable<String, Object> hash = JsonRPCMarshaller.deserializeJSONObject(commandJson);
+ UnsubscribeButtonResponse cmd = new UnsubscribeButtonResponse(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