Skip to content
Merged
Show file tree
Hide file tree
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 @@ -21,17 +21,13 @@
public class JpaDefaultTest extends TestTemplate {

@Test
public void testTutorial() throws Exception {
public void testJpaDefault() throws Exception {
setDatabaseCreationScript(new String[] {
"create table PERSON (ID int not null, NAME varchar(20), primary key (ID))",
"insert into PERSON values (1, 'foo')"
});
createProject();
executeGradleCommand("generateJava");
verifyProject();
}

private void verifyProject() throws Exception {
File generatedOutputFolder = new File(getProjectDir(), "app/generated-sources");
assertTrue(generatedOutputFolder.exists());
assertTrue(generatedOutputFolder.isDirectory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
public class NoAnnotationsTest extends TestTemplate {

@Test
public void testTutorial() throws Exception {
public void testNoAnnotations() throws Exception {
setDatabaseCreationScript(new String[] {
"create table PERSON (ID int not null, NAME varchar(20), primary key (ID))",
"insert into PERSON values (1, 'foo')"
Expand All @@ -33,10 +33,6 @@ public void testTutorial() throws Exception {
);
createProject();
executeGradleCommand("generateJava");
verifyProject();
}

private void verifyProject() throws Exception {
File generatedOutputFolder = new File(getProjectDir(), "app/generated-sources");
assertTrue(generatedOutputFolder.exists());
assertTrue(generatedOutputFolder.isDirectory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
public class NoGenerics extends TestTemplate {

@Test
public void testTutorial() throws Exception {
public void testNoGenerics() throws Exception {
setDatabaseCreationScript(new String[] {
"create table PERSON (ID int not null, NAME varchar(20), primary key (ID))",
"create table ITEM (ID int not null, NAME varchar(20), OWNER_ID int not null, " +
Expand All @@ -33,10 +33,6 @@ public void testTutorial() throws Exception {
);
createProject();
executeGradleCommand("generateJava");
verifyProject();
}

private void verifyProject() throws Exception {
File generatedOutputFolder = new File(getProjectDir(), "app/generated-sources");
assertTrue(generatedOutputFolder.exists());
assertTrue(generatedOutputFolder.isDirectory());
Expand All @@ -55,5 +51,5 @@ private void verifyProject() throws Exception {
Files.readAllBytes(generatedItemJavaFile.toPath()));
assertTrue(generatedItemJavaFileContents.contains("public class Item "));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,14 @@
public class UseGenerics extends TestTemplate {

@Test
public void testTutorial() throws Exception {
public void testUseGenerics() throws Exception {
setDatabaseCreationScript(new String[] {
"create table PERSON (ID int not null, NAME varchar(20), primary key (ID))",
"create table ITEM (ID int not null, NAME varchar(20), OWNER_ID int not null, " +
" primary key (ID), foreign key (OWNER_ID) references PERSON(ID))"
});
createProject();
executeGradleCommand("generateJava");
verifyProject();
}

private void verifyProject() throws Exception {
File generatedOutputFolder = new File(getProjectDir(), "app/generated-sources");
assertTrue(generatedOutputFolder.exists());
assertTrue(generatedOutputFolder.isDirectory());
Expand All @@ -50,5 +46,5 @@ private void verifyProject() throws Exception {
Files.readAllBytes(generatedItemJavaFile.toPath()));
assertTrue(generatedItemJavaFileContents.contains("public class Item "));
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ public void testTutorial() throws Exception {
});
createProject();
executeGradleCommand("generateJava");
verifyProject();
}

private void verifyProject() {
File generatedOutputFolder = new File(getProjectDir(), "app/generated-sources");
assertTrue(generatedOutputFolder.exists());
assertTrue(generatedOutputFolder.isDirectory());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ protected void addHibernateToolsExtension(StringBuffer gradleBuildFileContents)
gradleBuildFileContents.insert(pos + 1, "\n\n" + extension);
}
}

}