summaryrefslogtreecommitdiff
path: root/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DeviceStatusTests.java
diff options
context:
space:
mode:
Diffstat (limited to 'android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DeviceStatusTests.java')
-rw-r--r--android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DeviceStatusTests.java98
1 files changed, 49 insertions, 49 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DeviceStatusTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DeviceStatusTests.java
index e696e48c2..cc7b23cce 100644
--- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DeviceStatusTests.java
+++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/datatypes/DeviceStatusTests.java
@@ -4,7 +4,7 @@ import com.smartdevicelink.proxy.rpc.DeviceStatus;
import com.smartdevicelink.proxy.rpc.enums.DeviceLevelStatus;
import com.smartdevicelink.proxy.rpc.enums.PrimaryAudioSource;
import com.smartdevicelink.test.JsonUtils;
-import com.smartdevicelink.test.Test;
+import com.smartdevicelink.test.TestValues;
import junit.framework.TestCase;
@@ -25,17 +25,17 @@ public class DeviceStatusTests extends TestCase {
public void setUp(){
msg = new DeviceStatus();
- msg.setBattLevelStatus(Test.GENERAL_DEVICELEVELSTATUS);
- msg.setBtIconOn(Test.GENERAL_BOOLEAN);
- msg.setCallActive(Test.GENERAL_BOOLEAN);
- msg.setECallEventActive(Test.GENERAL_BOOLEAN);
- msg.setMonoAudioOutputMuted(Test.GENERAL_BOOLEAN);
- msg.setPhoneRoaming(Test.GENERAL_BOOLEAN);
- msg.setPrimaryAudioSource(Test.GENERAL_PRIMARYAUDIOSOURCE);
- msg.setSignalLevelStatus(Test.GENERAL_DEVICELEVELSTATUS);
- msg.setStereoAudioOutputMuted(Test.GENERAL_BOOLEAN);
- msg.setTextMsgAvailable(Test.GENERAL_BOOLEAN);
- msg.setVoiceRecOn(Test.GENERAL_BOOLEAN);
+ msg.setBattLevelStatus(TestValues.GENERAL_DEVICELEVELSTATUS);
+ msg.setBtIconOn(TestValues.GENERAL_BOOLEAN);
+ msg.setCallActive(TestValues.GENERAL_BOOLEAN);
+ msg.setECallEventActive(TestValues.GENERAL_BOOLEAN);
+ msg.setMonoAudioOutputMuted(TestValues.GENERAL_BOOLEAN);
+ msg.setPhoneRoaming(TestValues.GENERAL_BOOLEAN);
+ msg.setPrimaryAudioSource(TestValues.GENERAL_PRIMARYAUDIOSOURCE);
+ msg.setSignalLevelStatus(TestValues.GENERAL_DEVICELEVELSTATUS);
+ msg.setStereoAudioOutputMuted(TestValues.GENERAL_BOOLEAN);
+ msg.setTextMsgAvailable(TestValues.GENERAL_BOOLEAN);
+ msg.setVoiceRecOn(TestValues.GENERAL_BOOLEAN);
}
/**
@@ -56,61 +56,61 @@ public class DeviceStatusTests extends TestCase {
boolean voiceRec = msg.getVoiceRecOn();
// Valid Tests
- assertEquals(Test.MATCH, Test.GENERAL_DEVICELEVELSTATUS, battLevel);
- assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, btIcon);
- assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, callActive);
- assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, ecall);
- assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, monoAudio);
- assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, phoneRoaming);
- assertEquals(Test.MATCH, Test.GENERAL_PRIMARYAUDIOSOURCE, primaryAudio);
- assertEquals(Test.MATCH, Test.GENERAL_DEVICELEVELSTATUS, signalLevel);
- assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, stereoAudio);
- assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, textAvailable);
- assertEquals(Test.MATCH, Test.GENERAL_BOOLEAN, voiceRec);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_DEVICELEVELSTATUS, battLevel);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, btIcon);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, callActive);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, ecall);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, monoAudio);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, phoneRoaming);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_PRIMARYAUDIOSOURCE, primaryAudio);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_DEVICELEVELSTATUS, signalLevel);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, stereoAudio);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, textAvailable);
+ assertEquals(TestValues.MATCH, TestValues.GENERAL_BOOLEAN, voiceRec);
// Invalid/Null Tests
DeviceStatus msg = new DeviceStatus();
- assertNotNull(Test.NOT_NULL, msg);
+ assertNotNull(TestValues.NOT_NULL, msg);
- assertNull(Test.NULL, msg.getBattLevelStatus());
- assertNull(Test.NULL, msg.getBtIconOn());
- assertNull(Test.NULL, msg.getCallActive());
- assertNull(Test.NULL, msg.getECallEventActive());
- assertNull(Test.NULL, msg.getMonoAudioOutputMuted());
- assertNull(Test.NULL, msg.getPhoneRoaming());
- assertNull(Test.NULL, msg.getPrimaryAudioSource());
- assertNull(Test.NULL, msg.getSignalLevelStatus());
- assertNull(Test.NULL, msg.getStereoAudioOutputMuted());
- assertNull(Test.NULL, msg.getTextMsgAvailable());
- assertNull(Test.NULL, msg.getVoiceRecOn());
+ assertNull(TestValues.NULL, msg.getBattLevelStatus());
+ assertNull(TestValues.NULL, msg.getBtIconOn());
+ assertNull(TestValues.NULL, msg.getCallActive());
+ assertNull(TestValues.NULL, msg.getECallEventActive());
+ assertNull(TestValues.NULL, msg.getMonoAudioOutputMuted());
+ assertNull(TestValues.NULL, msg.getPhoneRoaming());
+ assertNull(TestValues.NULL, msg.getPrimaryAudioSource());
+ assertNull(TestValues.NULL, msg.getSignalLevelStatus());
+ assertNull(TestValues.NULL, msg.getStereoAudioOutputMuted());
+ assertNull(TestValues.NULL, msg.getTextMsgAvailable());
+ assertNull(TestValues.NULL, msg.getVoiceRecOn());
}
public void testJson(){
JSONObject reference = new JSONObject();
try{
- reference.put(DeviceStatus.KEY_BATT_LEVEL_STATUS, Test.GENERAL_DEVICELEVELSTATUS);
- reference.put(DeviceStatus.KEY_SIGNAL_LEVEL_STATUS, Test.GENERAL_DEVICELEVELSTATUS);
- reference.put(DeviceStatus.KEY_PRIMARY_AUDIO_SOURCE, Test.GENERAL_PRIMARYAUDIOSOURCE);
- reference.put(DeviceStatus.KEY_BT_ICON_ON, Test.GENERAL_BOOLEAN);
- reference.put(DeviceStatus.KEY_CALL_ACTIVE, Test.GENERAL_BOOLEAN);
- reference.put(DeviceStatus.KEY_E_CALL_EVENT_ACTIVE, Test.GENERAL_BOOLEAN);
- reference.put(DeviceStatus.KEY_MONO_AUDIO_OUTPUT_MUTED, Test.GENERAL_BOOLEAN);
- reference.put(DeviceStatus.KEY_STEREO_AUDIO_OUTPUT_MUTED, Test.GENERAL_BOOLEAN);
- reference.put(DeviceStatus.KEY_TEXT_MSG_AVAILABLE, Test.GENERAL_BOOLEAN);
- reference.put(DeviceStatus.KEY_PHONE_ROAMING, Test.GENERAL_BOOLEAN);
- reference.put(DeviceStatus.KEY_VOICE_REC_ON, Test.GENERAL_BOOLEAN);
+ reference.put(DeviceStatus.KEY_BATT_LEVEL_STATUS, TestValues.GENERAL_DEVICELEVELSTATUS);
+ reference.put(DeviceStatus.KEY_SIGNAL_LEVEL_STATUS, TestValues.GENERAL_DEVICELEVELSTATUS);
+ reference.put(DeviceStatus.KEY_PRIMARY_AUDIO_SOURCE, TestValues.GENERAL_PRIMARYAUDIOSOURCE);
+ reference.put(DeviceStatus.KEY_BT_ICON_ON, TestValues.GENERAL_BOOLEAN);
+ reference.put(DeviceStatus.KEY_CALL_ACTIVE, TestValues.GENERAL_BOOLEAN);
+ reference.put(DeviceStatus.KEY_E_CALL_EVENT_ACTIVE, TestValues.GENERAL_BOOLEAN);
+ reference.put(DeviceStatus.KEY_MONO_AUDIO_OUTPUT_MUTED, TestValues.GENERAL_BOOLEAN);
+ reference.put(DeviceStatus.KEY_STEREO_AUDIO_OUTPUT_MUTED, TestValues.GENERAL_BOOLEAN);
+ reference.put(DeviceStatus.KEY_TEXT_MSG_AVAILABLE, TestValues.GENERAL_BOOLEAN);
+ reference.put(DeviceStatus.KEY_PHONE_ROAMING, TestValues.GENERAL_BOOLEAN);
+ reference.put(DeviceStatus.KEY_VOICE_REC_ON, TestValues.GENERAL_BOOLEAN);
JSONObject underTest = msg.serializeJSON();
- assertEquals(Test.MATCH, reference.length(), underTest.length());
+ assertEquals(TestValues.MATCH, reference.length(), underTest.length());
Iterator<?> iterator = reference.keys();
while(iterator.hasNext()){
String key = (String) iterator.next();
- assertEquals(Test.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
+ assertEquals(TestValues.MATCH, JsonUtils.readObjectFromJsonObject(reference, key), JsonUtils.readObjectFromJsonObject(underTest, key));
}
} catch(JSONException e){
- fail(Test.JSON_FAIL);
+ fail(TestValues.JSON_FAIL);
}
}
} \ No newline at end of file