Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -27,19 +27,18 @@

class RunSqlTest extends TestTemplate {

private static final String HIBERNATE_TOOLS_EXTENSION_SECTION =
"hibernateTools {\n" +
" sqlToRun = 'create table foo (id int not null primary key, baz varchar(256))'\n" +
"}\n";

@BeforeEach
public void beforeEach() {
setGradleTaskToPerform("runSql");
}

@Test
void testRunSql() throws Exception {
setHibernateToolsExtensionSection(HIBERNATE_TOOLS_EXTENSION_SECTION);
setHibernateToolsExtensionSection(
"hibernateTools {\n" +
" sqlToRun = 'create table foo (id int not null primary key, baz varchar(256))'\n" +
"}\n"
);
assertNull(getDatabaseFile());
createProjectAndExecuteGradleCommand();
assertTrue(getBuildResult().getOutput().contains("Running SQL: create table foo (id int not null primary key, baz varchar(256))"));
Expand Down