use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MeasuredApplicationRepositoryTest method testGetRecentlyCreatedWhenThrows.
@DontRepeat
@Test
public void testGetRecentlyCreatedWhenThrows() throws Exception {
when(delegate.getRecentlyCreated()).thenThrow(new OperationFailedException());
assertThrows(() -> instance.getRecentlyCreated()).isInstanceOf(OperationFailedException.class);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class MemoryInboxRepositoryTest method testSaveMessageForUserWithBadArguments.
@DontRepeat
public void testSaveMessageForUserWithBadArguments() throws Exception {
assertThrows(() -> instance.saveMessageForUser(null, message)).isInstanceOf(InvalidArgumentException.class);
assertThrows(() -> instance.saveMessageForUser(user, null)).isInstanceOf(InvalidArgumentException.class);
assertThrows(() -> instance.saveMessageForUser(new User(), message)).isInstanceOf(InvalidArgumentException.class);
assertThrows(() -> instance.saveMessageForUser(user, new Message())).isInstanceOf(InvalidArgumentException.class);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class CassandraApplicationRepositoryTest method testDeleteApplicationWithBadArgs.
@DontRepeat
@Test
public void testDeleteApplicationWithBadArgs() throws Exception {
String empty = "";
assertThrows(() -> instance.deleteApplication(empty)).isInstanceOf(InvalidArgumentException.class);
String badId = one(alphabeticString());
assertThrows(() -> instance.deleteApplication(badId)).isInstanceOf(InvalidArgumentException.class);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class RequestAssertionsTest method testValidMessageWithBadMessages.
@DontRepeat
@Test
public void testValidMessageWithBadMessages() {
AlchemyAssertion<Message> assertion = RequestAssertions.validMessage();
assertThrows(() -> assertion.check(null)).isInstanceOf(FailedAssertionException.class);
Message emptyMessage = new Message();
assertThrows(() -> assertion.check(emptyMessage)).isInstanceOf(FailedAssertionException.class);
Message messageWithoutTitle = emptyMessage.setMessageId(one(uuids));
assertThrows(() -> assertion.check(messageWithoutTitle)).isInstanceOf(FailedAssertionException.class);
Message messageWithInvalidId = new Message(message).setMessageId(invalidId);
assertThrows(() -> assertion.check(messageWithInvalidId)).isInstanceOf(FailedAssertionException.class);
Message messageWithInvalidAppId = new Message(message).setApplicationId(invalidId);
assertThrows(() -> assertion.check(messageWithInvalidAppId)).isInstanceOf(FailedAssertionException.class);
}
use of tech.sirwellington.alchemy.test.junit.runners.DontRepeat in project aroma-data-operations by RedRoma.
the class CassandraOrganizationRepositoryIT method testSaveOrganizationTwice.
@DontRepeat
@TimeSensitive
@Test
public void testSaveOrganizationTwice() throws Exception {
instance.saveOrganization(org);
Thread.sleep(5);
instance.saveOrganization(org);
Organization result = instance.getOrganization(orgId);
assertMostlyMatch(result, org);
}
Aggregations