use of com.datastax.driver.mapping.entity.EntityMixedCase in project cassandra-driver-mapping by valchkou.
the class MappingSessionAsyncTest method saveAndGetAndDeleteMixedCaseTest.
@Test
public void saveAndGetAndDeleteMixedCaseTest() throws Exception {
int id = 12245;
EntityMixedCase obj = new EntityMixedCase();
obj.setId(id);
obj.setFirstName("firstName");
obj.setLastName("lastName");
obj.setAge(25);
EntityMixedCase loaded = target.get(EntityMixedCase.class, id);
assertNull(loaded);
ResultSetFuture f = target.saveAsync(obj);
f.getUninterruptibly();
loaded = target.get(EntityMixedCase.class, id);
assertEquals(obj, loaded);
f = target.deleteAsync(loaded);
f.getUninterruptibly();
loaded = target.get(EntityMixedCase.class, id);
assertNull(loaded);
}
Aggregations