use of tech.aroma.thrift.Organization 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.aroma.thrift.Organization in project aroma-data-operations by RedRoma.
the class CassandraOrganizationRepositoryIT method testGetOrganization.
@Test
public void testGetOrganization() throws Exception {
assertThrows(() -> instance.getOrganization(orgId)).isInstanceOf(OrganizationDoesNotExistException.class);
instance.saveOrganization(org);
Organization result = instance.getOrganization(orgId);
assertMostlyMatch(result, org);
}
use of tech.aroma.thrift.Organization 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