mirror of
https://github.com/eclipse-sailing-analytics/sailing-analytics.git
synced 2026-10-17 01:31:01 +00:00
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:
1 parent
13467a2eee
commit
7ecc533f8e
1 file changed
+16
+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);
|
||||
|
||||
Reference in new issue
Block a user