use of io.helidon.tests.integration.dbclient.common.AbstractIT.Type in project helidon by oracle.
the class FlowControlIT method testSourceData.
/**
* Source data verification.
*/
@Test
public void testSourceData() {
Multi<DbRow> rows = DB_CLIENT.execute(exec -> exec.namedQuery("select-types"));
assertThat(rows, notNullValue());
List<DbRow> list = rows.collectList().await();
assertThat(list, not(empty()));
assertThat(list.size(), equalTo(18));
for (DbRow row : list) {
Integer id = row.column(1).as(Integer.class);
String name = row.column(2).as(String.class);
final Type type = new Type(id, name);
assertThat(name, TYPES.get(id).getName().equals(name));
LOGGER.info(() -> String.format("Type: %s", type.toString()));
}
}