@Test
public void testSchemaGenIndex() throws Exception {
Path create = Paths.get("/tmp/create.sql");
assertTrue(Files.exists(create));
Path drop = Paths.get("/tmp/drop.sql");
assertTrue(Files.exists(create));
String line;
BufferedReader reader = Files.newBufferedReader(create, Charset.defaultCharset());
boolean createGenerated = false;
while ((line = reader.readLine()) != null) {
if (line.toLowerCase().contains("create table employee_schema_gen_scripts_generate")) {
createGenerated = true;
}
}
reader = Files.newBufferedReader(drop, Charset.defaultCharset());
boolean dropGenerated = false;
while ((line = reader.readLine()) != null) {
if (line.toLowerCase().contains("drop table employee_schema_gen_scripts_generate")) {
dropGenerated = true;
break;
}
}
assertTrue(createGenerated);
assertTrue(dropGenerated);
}