Search in sources :

Example 1 with Type

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()));
    }
}
Also used : DbRow(io.helidon.dbclient.DbRow) Type(io.helidon.tests.integration.dbclient.common.AbstractIT.Type) Test(org.junit.jupiter.api.Test)

Aggregations

DbRow (io.helidon.dbclient.DbRow)1 Type (io.helidon.tests.integration.dbclient.common.AbstractIT.Type)1 Test (org.junit.jupiter.api.Test)1