use of jakarta.nosql.column.ColumnQuery.select in project jnosql-diana-driver by eclipse.
the class CassandraColumnFamilyManagerTest method shouldCreateUDTWithSet.
@Test
public void shouldCreateUDTWithSet() {
ColumnEntity entity = createEntityWithIterableSet();
entityManager.insert(entity);
ColumnQuery query = ColumnQuery.select().from("agenda").build();
final ColumnEntity result = entityManager.singleResult(query).get();
Assert.assertEquals(Column.of("user", "otaviojava"), result.find("user").get());
Assert.assertEquals(2, result.size());
List<List<Column>> names = (List<List<Column>>) result.find("names").get().get();
assertEquals(3, names.size());
assertTrue(names.stream().allMatch(n -> n.size() == 2));
}
Aggregations