use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MeasuredUserRepositoryTest method testContainsUserWhenThrows.
@DontRepeat
@Test
public void testContainsUserWhenThrows() throws Exception {
when(delegate.containsUser(userId)).thenThrow(new OperationFailedException());
assertThrows(() -> instance.containsUser(userId)).isInstanceOf(OperationFailedException.class);
verify(delegate).containsUser(userId);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MeasuredUserRepositoryTest method testGetUserWhenThrows.
@DontRepeat
@Test
public void testGetUserWhenThrows() throws Exception {
when(delegate.getUser(userId)).thenThrow(new OperationFailedException());
assertThrows(() -> instance.getUser(userId)).isInstanceOf(OperationFailedException.class);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat 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.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MemoryUserRepositoryTest method testSaveUserWithBadArgs.
@DontRepeat
@Test
public void testSaveUserWithBadArgs() {
assertThrows(() -> instance.saveUser(null)).isInstanceOf(InvalidArgumentException.class);
assertThrows(() -> instance.saveUser(new User())).isInstanceOf(InvalidArgumentException.class);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MeasuredApplicationRepositoryTest method testSaveApplicationWhenThrows.
@DontRepeat
@Test
public void testSaveApplicationWhenThrows() throws Exception {
doThrow(new OperationFailedException()).when(delegate).saveApplication(application);
assertThrows(() -> instance.saveApplication(application)).isInstanceOf(OperationFailedException.class);
verify(delegate).saveApplication(application);
}
Aggregations