diff options
Diffstat (limited to 'android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java')
-rw-r--r-- | android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/requests/ResetGlobalPropertiesTests.java | 30 |
1 files changed, 15 insertions, 15 deletions
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 408c809be..2ae30e8d8 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 @@ -7,7 +7,7 @@ import com.smartdevicelink.proxy.rpc.ResetGlobalProperties; import com.smartdevicelink.proxy.rpc.enums.GlobalProperty; 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.JSONArray; @@ -27,7 +27,7 @@ public class ResetGlobalPropertiesTests extends BaseRpcTests { protected RPCMessage createMessage() { ResetGlobalProperties msg = new ResetGlobalProperties(); - msg.setProperties(Test.GENERAL_GLOBALPROPERTY_LIST); + msg.setProperties(TestValues.GENERAL_GLOBALPROPERTY_LIST); return msg; } @@ -47,9 +47,9 @@ public class ResetGlobalPropertiesTests extends BaseRpcTests { JSONObject result = new JSONObject(); try { - result.put(ResetGlobalProperties.KEY_PROPERTIES, JsonUtils.createJsonArray(Test.GENERAL_GLOBALPROPERTY_LIST)); + result.put(ResetGlobalProperties.KEY_PROPERTIES, JsonUtils.createJsonArray(TestValues.GENERAL_GLOBALPROPERTY_LIST)); } catch (JSONException e) { - fail(Test.JSON_FAIL); + fail(TestValues.JSON_FAIL); } return result; @@ -63,17 +63,17 @@ public class ResetGlobalPropertiesTests extends BaseRpcTests { List<GlobalProperty> copy = ( (ResetGlobalProperties) msg ).getProperties(); // Valid Tests - assertEquals(Test.MATCH, Test.GENERAL_GLOBALPROPERTY_LIST.size(), copy.size()); - for(int i = 0; i < Test.GENERAL_GLOBALPROPERTY_LIST.size(); i++){ - assertEquals(Test.MATCH, Test.GENERAL_GLOBALPROPERTY_LIST.get(i), copy.get(i)); + assertEquals(TestValues.MATCH, TestValues.GENERAL_GLOBALPROPERTY_LIST.size(), copy.size()); + for(int i = 0; i < TestValues.GENERAL_GLOBALPROPERTY_LIST.size(); i++){ + assertEquals(TestValues.MATCH, TestValues.GENERAL_GLOBALPROPERTY_LIST.get(i), copy.get(i)); } // Invalid/Null Tests ResetGlobalProperties msg = new ResetGlobalProperties(); - assertNotNull(Test.NOT_NULL, msg); + assertNotNull(TestValues.NOT_NULL, msg); testNullBase(msg); - assertNull(Test.NULL, msg.getProperties()); + assertNull(TestValues.NULL, msg.getProperties()); } /** @@ -81,28 +81,28 @@ public class ResetGlobalPropertiesTests 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); ResetGlobalProperties cmd = new ResetGlobalProperties(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); JSONArray propertiesArray = JsonUtils.readJsonArrayFromJsonObject(parameters, ResetGlobalProperties.KEY_PROPERTIES); for (int index = 0; index < propertiesArray.length(); index++) { GlobalProperty property = GlobalProperty.valueOf(propertiesArray.get(index).toString()); - assertEquals(Test.MATCH, property, cmd.getProperties().get(index)); + assertEquals(TestValues.MATCH, property, cmd.getProperties().get(index)); } } catch (JSONException e) { - fail(Test.JSON_FAIL); + fail(TestValues.JSON_FAIL); } } }
\ No newline at end of file |