use of tech.aroma.thrift.Message in project aroma-data-operations by RedRoma.
the class MemoryMessageRepositoryTest method testGetMessage.
@Test
public void testGetMessage() throws Exception {
instance.saveMessage(message);
Message result = instance.getMessage(applicationId, messageId);
assertThat(result, is(message));
}
use of tech.aroma.thrift.Message 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);
}
Aggregations