@Test public void stringToUserStatusShouldReturnCorrectStatusBasedOnInputString() { assertEquals(UserStatus.ACTIVE, UserStatus.stringToUserStatus(active)); assertEquals(UserStatus.LOCKED, UserStatus.stringToUserStatus(locked)); assertEquals(UserStatus.BANNED, UserStatus.stringToUserStatus(banned)); }
@Test public void stringToUserStatusShoudReturnActiveForIncorrectInputs() { assertEquals(UserStatus.ACTIVE, UserStatus.stringToUserStatus("aefwe")); assertEquals(UserStatus.ACTIVE, UserStatus.stringToUserStatus(" Active ")); }
@Test public void stringToUserStatusShouldReturnActiveForNullOrEmptyString() { assertEquals(UserStatus.ACTIVE, UserStatus.stringToUserStatus(new String())); assertEquals(UserStatus.ACTIVE, UserStatus.stringToUserStatus("")); }