use of io.bootique.jdbc.test.DatabaseChannel in project bootique-jdbc by bootique.
the class CsvDataSetBuilderIT method setupDB.
@BeforeClass
public static void setupDB() {
BQRuntime runtime = TEST_FACTORY.app("--config=classpath:io/bootique/jdbc/test/dataset/CsvDataSetBuilderIT.yml").autoLoadModules().createRuntime();
DatabaseChannel channel = DatabaseChannel.get(runtime);
channel.execStatement().exec("CREATE TABLE \"t1\" (\"c1\" INT, \"c2\" VARCHAR(10), \"c3\" VARCHAR(10))");
channel.execStatement().exec("CREATE TABLE \"t2\" (\"c1\" INT, \"c2\" INT, \"c3\" DATE, \"c4\" TIMESTAMP)");
channel.execStatement().exec("CREATE TABLE \"t3\" (\"c1\" INT, \"c2\" VARCHAR (10) FOR BIT DATA)");
channel.execStatement().exec("CREATE TABLE \"t4\" (\"c1\" INT, \"c2\" BOOLEAN)");
T1 = channel.newTable("t1").columnNames("c1", "c2", "c3").initColumnTypesFromDBMetadata().build();
T2 = channel.newTable("t2").columnNames("c1", "c2", "c3", "c4").initColumnTypesFromDBMetadata().build();
T3 = channel.newTable("t3").columnNames("c1", "c2").initColumnTypesFromDBMetadata().build();
T4 = channel.newTable("t4").columnNames("c1", "c2").initColumnTypesFromDBMetadata().build();
}
use of io.bootique.jdbc.test.DatabaseChannel in project bootique-jdbc by bootique.
the class CsvDataSetBuilderTest method before.
@Before
public void before() {
DatabaseChannel mockChannel = mock(DatabaseChannel.class);
table = Table.builder(mockChannel, "t_t").columns(new Column("c1", Types.VARCHAR), new Column("c2", Types.INTEGER), new Column("c3", Types.VARBINARY)).build();
}
use of io.bootique.jdbc.test.DatabaseChannel in project bootique-jdbc by bootique.
the class TableMatcherIT method setupDB.
@BeforeClass
public static void setupDB() {
BQRuntime runtime = TEST_FACTORY.app("-c", "classpath:io/bootique/jdbc/test/matcher/TableMatcherIT.yml").autoLoadModules().createRuntime();
DatabaseChannel channel = DatabaseChannel.get(runtime);
channel.execStatement().exec("CREATE TABLE \"t1\" (\"c1\" INT, \"c2\" VARCHAR(10), \"c3\" VARCHAR(10))");
channel.execStatement().exec("CREATE TABLE \"t2\" (\"c1\" INT, \"c2\" INT, \"c3\" DATE, \"c4\" TIMESTAMP)");
channel.execStatement().exec("CREATE TABLE \"t3\" (\"c1\" INT, \"c2\" VARCHAR (10) FOR BIT DATA)");
T1 = channel.newTable("t1").columnNames("c1", "c2", "c3").initColumnTypesFromDBMetadata().build();
T2 = channel.newTable("t2").columnNames("c1", "c2", "c3", "c4").initColumnTypesFromDBMetadata().build();
T3 = channel.newTable("t3").columnNames("c1", "c2").initColumnTypesFromDBMetadata().build();
}
Aggregations