diff options
Diffstat (limited to 'android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ECallConfirmationStatusTests.java')
-rw-r--r-- | android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ECallConfirmationStatusTests.java | 130 |
1 files changed, 64 insertions, 66 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ECallConfirmationStatusTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ECallConfirmationStatusTests.java index b7b79fcaf..9135281fa 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ECallConfirmationStatusTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/ECallConfirmationStatusTests.java @@ -9,83 +9,81 @@ import java.util.Arrays; import java.util.List; /** - * 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.enums.ECallConfirmationStatus} */ public class ECallConfirmationStatusTests extends TestCase { - /** - * Verifies that the enum values are not null upon valid assignment. - */ - public void testValidEnums () { - String example = "NORMAL"; - ECallConfirmationStatus enumNormal = ECallConfirmationStatus.valueForString(example); - example = "CALL_IN_PROGRESS"; - ECallConfirmationStatus enumCallInProgress = ECallConfirmationStatus.valueForString(example); - example = "CALL_CANCELLED"; - ECallConfirmationStatus enumCancelled = ECallConfirmationStatus.valueForString(example); - example = "CALL_COMPLETED"; - ECallConfirmationStatus enumCompleted = ECallConfirmationStatus.valueForString(example); - example = "CALL_UNSUCCESSFUL"; - ECallConfirmationStatus enumUnsuccessful = ECallConfirmationStatus.valueForString(example); - example = "ECALL_CONFIGURED_OFF"; - ECallConfirmationStatus enumConfiguredOff = ECallConfirmationStatus.valueForString(example); - example = "CALL_COMPLETE_DTMF_TIMEOUT"; - ECallConfirmationStatus enumCompleteDtmfTimeout = ECallConfirmationStatus.valueForString(example); - - assertNotNull("NORMAL returned null", enumNormal); - assertNotNull("CALL_IN_PROGRESS returned null", enumCallInProgress); - assertNotNull("CALL_CANCELLED returned null", enumCancelled); - assertNotNull("CALL_COMPLETED returned null", enumCompleted); - assertNotNull("CALL_UNSUCCESSFUL returned null", enumUnsuccessful); - assertNotNull("ECALL_CONFIGURED_OFF returned null", enumConfiguredOff); - assertNotNull("CALL_COMPLETE_DTMF_TIMEOUT returned null", enumCompleteDtmfTimeout); - } + /** + * Verifies that the enum values are not null upon valid assignment. + */ + public void testValidEnums() { + String example = "NORMAL"; + ECallConfirmationStatus enumNormal = ECallConfirmationStatus.valueForString(example); + example = "CALL_IN_PROGRESS"; + ECallConfirmationStatus enumCallInProgress = ECallConfirmationStatus.valueForString(example); + example = "CALL_CANCELLED"; + ECallConfirmationStatus enumCancelled = ECallConfirmationStatus.valueForString(example); + example = "CALL_COMPLETED"; + ECallConfirmationStatus enumCompleted = ECallConfirmationStatus.valueForString(example); + example = "CALL_UNSUCCESSFUL"; + ECallConfirmationStatus enumUnsuccessful = ECallConfirmationStatus.valueForString(example); + example = "ECALL_CONFIGURED_OFF"; + ECallConfirmationStatus enumConfiguredOff = ECallConfirmationStatus.valueForString(example); + example = "CALL_COMPLETE_DTMF_TIMEOUT"; + ECallConfirmationStatus enumCompleteDtmfTimeout = ECallConfirmationStatus.valueForString(example); - /** - * Verifies that an invalid assignment is null. - */ - public void testInvalidEnum () { - String example = "noRMal"; - try { - ECallConfirmationStatus temp = ECallConfirmationStatus.valueForString(example); + assertNotNull("NORMAL returned null", enumNormal); + assertNotNull("CALL_IN_PROGRESS returned null", enumCallInProgress); + assertNotNull("CALL_CANCELLED returned null", enumCancelled); + assertNotNull("CALL_COMPLETED returned null", enumCompleted); + assertNotNull("CALL_UNSUCCESSFUL returned null", enumUnsuccessful); + assertNotNull("ECALL_CONFIGURED_OFF returned null", enumConfiguredOff); + assertNotNull("CALL_COMPLETE_DTMF_TIMEOUT returned null", enumCompleteDtmfTimeout); + } + + /** + * Verifies that an invalid assignment is null. + */ + public void testInvalidEnum() { + String example = "noRMal"; + try { + ECallConfirmationStatus temp = ECallConfirmationStatus.valueForString(example); assertNull("Result of valueForString should be null.", temp); - } - catch (IllegalArgumentException exception) { + } catch (IllegalArgumentException exception) { fail("Null string throws NullPointerException."); - } - } + } + } - /** - * Verifies that a null assignment is invalid. - */ - public void testNullEnum () { - String example = null; - try { - ECallConfirmationStatus temp = ECallConfirmationStatus.valueForString(example); + /** + * Verifies that a null assignment is invalid. + */ + public void testNullEnum() { + String example = null; + try { + ECallConfirmationStatus temp = ECallConfirmationStatus.valueForString(example); assertNull("Result of valueForString should be null.", temp); - } - catch (NullPointerException exception) { + } catch (NullPointerException exception) { fail("Null string throws NullPointerException."); - } - } + } + } - /** - * Verifies the possible enum values of ECallConfirmationStatus. - */ - public void testListEnum() { - List<ECallConfirmationStatus> enumValueList = Arrays.asList(ECallConfirmationStatus.values()); + /** + * Verifies the possible enum values of ECallConfirmationStatus. + */ + public void testListEnum() { + List<ECallConfirmationStatus> enumValueList = Arrays.asList(ECallConfirmationStatus.values()); - List<ECallConfirmationStatus> enumTestList = new ArrayList<ECallConfirmationStatus>(); - enumTestList.add(ECallConfirmationStatus.NORMAL); - enumTestList.add(ECallConfirmationStatus.CALL_IN_PROGRESS); - enumTestList.add(ECallConfirmationStatus.CALL_CANCELLED); - enumTestList.add(ECallConfirmationStatus.CALL_COMPLETED); - enumTestList.add(ECallConfirmationStatus.CALL_UNSUCCESSFUL); - enumTestList.add(ECallConfirmationStatus.ECALL_CONFIGURED_OFF); - enumTestList.add(ECallConfirmationStatus.CALL_COMPLETE_DTMF_TIMEOUT); + List<ECallConfirmationStatus> enumTestList = new ArrayList<ECallConfirmationStatus>(); + enumTestList.add(ECallConfirmationStatus.NORMAL); + enumTestList.add(ECallConfirmationStatus.CALL_IN_PROGRESS); + enumTestList.add(ECallConfirmationStatus.CALL_CANCELLED); + enumTestList.add(ECallConfirmationStatus.CALL_COMPLETED); + enumTestList.add(ECallConfirmationStatus.CALL_UNSUCCESSFUL); + enumTestList.add(ECallConfirmationStatus.ECALL_CONFIGURED_OFF); + enumTestList.add(ECallConfirmationStatus.CALL_COMPLETE_DTMF_TIMEOUT); - assertTrue("Enum value list does not match enum class list", - enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList)); - } + assertTrue("Enum value list does not match enum class list", + enumValueList.containsAll(enumTestList) && enumTestList.containsAll(enumValueList)); + } }
\ No newline at end of file |