diff options
author | Robert Henigan <robert.henigan@livio.io> | 2020-09-21 10:55:03 -0400 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-09-21 10:55:03 -0400 |
commit | 925d9c5b6e0c41fd5af166aa45bdd72125585ad8 (patch) | |
tree | 67cafde80b2663faa85e51530ffe7bd008758ad8 /android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LayoutModeTests.java | |
parent | c003e108393c51dff1ec4971987ef38c793673f1 (diff) | |
parent | 9bf45a71a2649ea9f874c0b5138d4495cdd5abc4 (diff) | |
download | sdl_android-925d9c5b6e0c41fd5af166aa45bdd72125585ad8.tar.gz |
Merge pull request #1505 from smartdevicelink/feature/code_formatting
Reformat project code
Diffstat (limited to 'android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LayoutModeTests.java')
-rw-r--r-- | android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LayoutModeTests.java | 116 |
1 files changed, 57 insertions, 59 deletions
diff --git a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LayoutModeTests.java b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LayoutModeTests.java index 8787ae602..2a04539ad 100644 --- a/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LayoutModeTests.java +++ b/android/sdl_android/src/androidTest/java/com/smartdevicelink/test/rpc/enums/LayoutModeTests.java @@ -9,76 +9,74 @@ 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.LayoutMode} */ public class LayoutModeTests extends TestCase { - /** - * Verifies that the enum values are not null upon valid assignment. - */ - public void testValidEnums () { - String example = "ICON_ONLY"; - LayoutMode enumIconOnly = LayoutMode.valueForString(example); - example = "ICON_WITH_SEARCH"; - LayoutMode enumIconWithSearch = LayoutMode.valueForString(example); - example = "LIST_ONLY"; - LayoutMode enumListOnly = LayoutMode.valueForString(example); - example = "LIST_WITH_SEARCH"; - LayoutMode enumListWithSearch = LayoutMode.valueForString(example); - example = "KEYBOARD"; - LayoutMode enumKeyboard = LayoutMode.valueForString(example); - - assertNotNull("ICON_ONLY returned null", enumIconOnly); - assertNotNull("ICON_WITH_SEARCH returned null", enumIconWithSearch); - assertNotNull("LIST_ONLY returned null", enumListOnly); - assertNotNull("LIST_WITH_SEARCH returned null", enumListWithSearch); - assertNotNull("KEYBOARD returned null", enumKeyboard); - } + /** + * Verifies that the enum values are not null upon valid assignment. + */ + public void testValidEnums() { + String example = "ICON_ONLY"; + LayoutMode enumIconOnly = LayoutMode.valueForString(example); + example = "ICON_WITH_SEARCH"; + LayoutMode enumIconWithSearch = LayoutMode.valueForString(example); + example = "LIST_ONLY"; + LayoutMode enumListOnly = LayoutMode.valueForString(example); + example = "LIST_WITH_SEARCH"; + LayoutMode enumListWithSearch = LayoutMode.valueForString(example); + example = "KEYBOARD"; + LayoutMode enumKeyboard = LayoutMode.valueForString(example); - /** - * Verifies that an invalid assignment is null. - */ - public void testInvalidEnum () { - String example = "icOn_OnlY"; - try { - LayoutMode temp = LayoutMode.valueForString(example); + assertNotNull("ICON_ONLY returned null", enumIconOnly); + assertNotNull("ICON_WITH_SEARCH returned null", enumIconWithSearch); + assertNotNull("LIST_ONLY returned null", enumListOnly); + assertNotNull("LIST_WITH_SEARCH returned null", enumListWithSearch); + assertNotNull("KEYBOARD returned null", enumKeyboard); + } + + /** + * Verifies that an invalid assignment is null. + */ + public void testInvalidEnum() { + String example = "icOn_OnlY"; + try { + LayoutMode temp = LayoutMode.valueForString(example); assertNull("Result of valueForString should be null.", temp); - } - catch (IllegalArgumentException exception) { + } catch (IllegalArgumentException exception) { fail("Invalid enum throws IllegalArgumentException."); - } - } + } + } - /** - * Verifies that a null assignment is invalid. - */ - public void testNullEnum () { - String example = null; - try { - LayoutMode temp = LayoutMode.valueForString(example); + /** + * Verifies that a null assignment is invalid. + */ + public void testNullEnum() { + String example = null; + try { + LayoutMode temp = LayoutMode.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 LayoutMode. - */ - public void testListEnum() { - List<LayoutMode> enumValueList = Arrays.asList(LayoutMode.values()); + /** + * Verifies the possible enum values of LayoutMode. + */ + public void testListEnum() { + List<LayoutMode> enumValueList = Arrays.asList(LayoutMode.values()); - List<LayoutMode> enumTestList = new ArrayList<LayoutMode>(); - enumTestList.add(LayoutMode.ICON_ONLY); - enumTestList.add(LayoutMode.ICON_WITH_SEARCH); - enumTestList.add(LayoutMode.LIST_ONLY); - enumTestList.add(LayoutMode.LIST_WITH_SEARCH); - enumTestList.add(LayoutMode.KEYBOARD); + List<LayoutMode> enumTestList = new ArrayList<LayoutMode>(); + enumTestList.add(LayoutMode.ICON_ONLY); + enumTestList.add(LayoutMode.ICON_WITH_SEARCH); + enumTestList.add(LayoutMode.LIST_ONLY); + enumTestList.add(LayoutMode.LIST_WITH_SEARCH); + enumTestList.add(LayoutMode.KEYBOARD); - 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 |