Added a failing test to verify that getUserByEmail currently throws a

NullPointerException if there is no user for a given email address
This commit is contained in:
Steffen Schaefer committed 2016-07-07 10:49:13 +02:00
1 parent 13467a2eee
commit 7ecc533f8e
1 file changed
+16
@@ -55,6 +55,22 @@ public class UserStoreWithPersistenceTest {
assertNotNull(store.getUserByEmail(email));
}
/**
* There was a {@link NullPointerException} thrown if calling getUserByEmail for an email address for which there
* wasn't an associated user.
*/
@Test
public void testDeleteUser() throws UserManagementException {
store.createUser(username, email);
store.deleteUser(username);
assertNull(store.getUserByName(username));
assertNull(store.getUserByEmail(email));
newStore();
assertNull(store.getUserByName(username));
assertNull(store.getUserByEmail(email));
}
@Test
public void testSetPreferences() throws UserManagementException {
store.createUser(username, email);