use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class CassandraInboxRepositoryTest method testContainsMessageInInboxWithBadArgs.
@DontRepeat
@Test
public void testContainsMessageInInboxWithBadArgs() throws Exception {
assertThrows(() -> instance.containsMessageInInbox(badId, message)).isInstanceOf(InvalidArgumentException.class);
Message messageWithBadId = new Message(message).setMessageId(badId);
assertThrows(() -> instance.containsMessageInInbox(userId, messageWithBadId)).isInstanceOf(InvalidArgumentException.class);
Message messageWithBadAppId = new Message(message).setApplicationId(badId);
assertThrows(() -> instance.containsMessageInInbox(userId, messageWithBadAppId)).isInstanceOf(InvalidArgumentException.class);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MemoryOrganizationRepositoryTest method testSaveOrgWithBadArgs.
@DontRepeat
@Test
public void testSaveOrgWithBadArgs() throws Exception {
assertThrows(() -> instance.saveOrganization(null)).isInstanceOf(InvalidArgumentException.class);
assertThrows(() -> instance.saveOrganization(new Organization())).isInstanceOf(InvalidArgumentException.class);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MeasuredUserRepositoryTest method testFindByGithubProfileWhenThrows.
@DontRepeat
@Test
public void testFindByGithubProfileWhenThrows() throws Exception {
when(delegate.findByGithubProfile(githubProfile)).thenThrow(new OperationFailedException());
assertThrows(() -> instance.findByGithubProfile(githubProfile)).isInstanceOf(OperationFailedException.class);
verify(delegate).findByGithubProfile(githubProfile);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MeasuredApplicationRepositoryTest method testDeleteApplicationWhenThrows.
@DontRepeat
@Test
public void testDeleteApplicationWhenThrows() throws Exception {
doThrow(new ApplicationDoesNotExistException()).when(delegate).deleteApplication(appId);
assertThrows(() -> instance.deleteApplication(appId)).isInstanceOf(ApplicationDoesNotExistException.class);
verify(delegate).deleteApplication(appId);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MeasuredApplicationRepositoryTest method testContainsApplicationWhenThrows.
@DontRepeat
@Test
public void testContainsApplicationWhenThrows() throws Exception {
when(delegate.containsApplication(appId)).thenThrow(new OperationFailedException());
assertThrows(() -> instance.containsApplication(appId)).isInstanceOf(OperationFailedException.class);
}
Aggregations