summaryrefslogtreecommitdiff
path: root/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java')
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ChangeRegistrationTests.java36
1 files changed, 18 insertions, 18 deletions
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 9eda2e182..8404f3b47 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
@@ -7,7 +7,7 @@ import com.smartdevicelink.proxy.rpc.ChangeRegistration;
import com.smartdevicelink.proxy.rpc.enums.Language;
import com.smartdevicelink.test.BaseRpcTests;
import com.smartdevicelink.test.JsonUtils;
-import com.smartdevicelink.test.Test;
+import com.smartdevicelink.test.TestValues;
import com.smartdevicelink.test.json.rpc.JsonFileReader;
import org.json.JSONException;
@@ -25,8 +25,8 @@ public class ChangeRegistrationTests extends BaseRpcTests{
protected RPCMessage createMessage(){
ChangeRegistration msg = new ChangeRegistration();
- msg.setLanguage(Test.GENERAL_LANGUAGE);
- msg.setHmiDisplayLanguage(Test.GENERAL_LANGUAGE);
+ msg.setLanguage(TestValues.GENERAL_LANGUAGE);
+ msg.setHmiDisplayLanguage(TestValues.GENERAL_LANGUAGE);
return msg;
}
@@ -46,10 +46,10 @@ public class ChangeRegistrationTests extends BaseRpcTests{
JSONObject result = new JSONObject();
try{
- result.put(ChangeRegistration.KEY_LANGUAGE, Test.GENERAL_LANGUAGE);
- result.put(ChangeRegistration.KEY_HMI_DISPLAY_LANGUAGE, Test.GENERAL_LANGUAGE);
+ result.put(ChangeRegistration.KEY_LANGUAGE, TestValues.GENERAL_LANGUAGE);
+ result.put(ChangeRegistration.KEY_HMI_DISPLAY_LANGUAGE, TestValues.GENERAL_LANGUAGE);
}catch(JSONException e){
- fail(Test.JSON_FAIL);
+ fail(TestValues.JSON_FAIL);
}
return result;
@@ -64,16 +64,16 @@ public class ChangeRegistrationTests extends BaseRpcTests{
Language testHmiLanguage = ( (ChangeRegistration) msg ).getHmiDisplayLanguage();
// Valid Tests
- assertEquals(Test.MATCH, Test.GENERAL_LANGUAGE, testLanguage);
- assertEquals(Test.MATCH, Test.GENERAL_LANGUAGE, testHmiLanguage);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_LANGUAGE, testLanguage);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_LANGUAGE, testHmiLanguage);
// Invalid/Null Tests
ChangeRegistration msg = new ChangeRegistration();
- assertNotNull(Test.NOT_NULL, msg);
+ assertNotNull(TestValues.NOT_NULL, msg);
testNullBase(msg);
- assertNull(Test.NULL, msg.getLanguage());
- assertNull(Test.NULL, msg.getHmiDisplayLanguage());
+ assertNull(TestValues.NULL, msg.getLanguage());
+ assertNull(TestValues.NULL, msg.getHmiDisplayLanguage());
}
/**
@@ -81,24 +81,24 @@ public class ChangeRegistrationTests extends BaseRpcTests{
*/
public void testJsonConstructor () {
JSONObject commandJson = JsonFileReader.readId(this.mContext, getCommandType(), getMessageType());
- assertNotNull(Test.NOT_NULL, commandJson);
+ assertNotNull(TestValues.NOT_NULL, commandJson);
try {
Hashtable<String, Object> hash = JsonRPCMarshaller.deserializeJSONObject(commandJson);
ChangeRegistration cmd = new ChangeRegistration(hash);
JSONObject body = JsonUtils.readJsonObjectFromJsonObject(commandJson, getMessageType());
- assertNotNull(Test.NOT_NULL, body);
+ assertNotNull(TestValues.NOT_NULL, body);
// Test everything in the json body.
- assertEquals(Test.MATCH, JsonUtils.readStringFromJsonObject(body, RPCMessage.KEY_FUNCTION_NAME), cmd.getFunctionName());
- assertEquals(Test.MATCH, JsonUtils.readIntegerFromJsonObject(body, RPCMessage.KEY_CORRELATION_ID), cmd.getCorrelationID());
+ assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(body, RPCMessage.KEY_FUNCTION_NAME), cmd.getFunctionName());
+ assertEquals(TestValues.MATCH, JsonUtils.readIntegerFromJsonObject(body, RPCMessage.KEY_CORRELATION_ID), cmd.getCorrelationID());
JSONObject parameters = JsonUtils.readJsonObjectFromJsonObject(body, RPCMessage.KEY_PARAMETERS);
- assertEquals(Test.MATCH, JsonUtils.readStringFromJsonObject(parameters, ChangeRegistration.KEY_LANGUAGE), cmd.getLanguage().toString());
- assertEquals(Test.MATCH, JsonUtils.readStringFromJsonObject(parameters, ChangeRegistration.KEY_HMI_DISPLAY_LANGUAGE), cmd.getHmiDisplayLanguage().toString());
+ assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, ChangeRegistration.KEY_LANGUAGE), cmd.getLanguage().toString());
+ assertEquals(TestValues.MATCH, JsonUtils.readStringFromJsonObject(parameters, ChangeRegistration.KEY_HMI_DISPLAY_LANGUAGE), cmd.getHmiDisplayLanguage().toString());
} catch (JSONException e) {
- fail(Test.JSON_FAIL);
+ fail(TestValues.JSON_FAIL);
}
}
} \ No newline at end of file