use of tech.aroma.thrift.exceptions.UserDoesNotExistException in project aroma-data-operations by RedRoma.
the class MeasuredUserRepositoryTest method testGetUserByEmailWhenThrows.
@DontRepeat
@Test
public void testGetUserByEmailWhenThrows() throws Exception {
when(delegate.getUserByEmail(email)).thenThrow(new UserDoesNotExistException());
assertThrows(() -> instance.getUserByEmail(email)).isInstanceOf(UserDoesNotExistException.class);
verify(delegate).getUserByEmail(email);
}
use of tech.aroma.thrift.exceptions.UserDoesNotExistException in project aroma-data-operations by RedRoma.
the class MeasuredUserRepositoryTest method testDeleteUserWhenThrows.
@DontRepeat
@Test
public void testDeleteUserWhenThrows() throws Exception {
doThrow(new UserDoesNotExistException()).when(delegate).deleteUser(userId);
assertThrows(() -> instance.deleteUser(userId)).isInstanceOf(UserDoesNotExistException.class);
verify(delegate).deleteUser(userId);
}
Aggregations