diff options
author | Trygve Laugstøl <trygvis@inamo.no> | 2013-08-07 23:53:53 +0200 |
---|---|---|
committer | Trygve Laugstøl <trygvis@inamo.no> | 2013-08-07 23:53:53 +0200 |
commit | 26b01b500065634eb3133dc354a0ba71b13bff56 (patch) | |
tree | 2fed1b329f421b7da7bf6c223f17fad230d1b5bd /container-compiler-plugin/src/test/java/io | |
parent | dd150071369e825d4b4a59e15ad3291841c7ba13 (diff) | |
download | container-playground-26b01b500065634eb3133dc354a0ba71b13bff56.tar.gz container-playground-26b01b500065634eb3133dc354a0ba71b13bff56.tar.bz2 container-playground-26b01b500065634eb3133dc354a0ba71b13bff56.tar.xz container-playground-26b01b500065634eb3133dc354a0ba71b13bff56.zip |
wip
o Start of JPA implementation.
Diffstat (limited to 'container-compiler-plugin/src/test/java/io')
3 files changed, 6 insertions, 4 deletions
diff --git a/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/InMemoryJavaFileManager.java b/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/InMemoryJavaFileManager.java index 60a78ae..5778adf 100644 --- a/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/InMemoryJavaFileManager.java +++ b/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/InMemoryJavaFileManager.java @@ -61,7 +61,7 @@ public class InMemoryJavaFileManager extends ForwardingJavaFileManager<StandardJ @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException { - if(code == null) { + if (code == null) { throw new FileNotFoundException(className); } diff --git a/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/ProcessorTest.java b/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/ProcessorTest.java index 4266a01..ed894c5 100644 --- a/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/ProcessorTest.java +++ b/container-compiler-plugin/src/test/java/io/trygvis/container/compiler/ProcessorTest.java @@ -62,7 +62,8 @@ public class ProcessorTest { assertThat(fileManager.codes.keySet()).containsOnly( "io.trygvis.persistence.test.Sequences", - "io.trygvis.persistence.test.Session", + "io.trygvis.persistence.test.TestEntityManager", + "io.trygvis.persistence.test.TestEntityManagerFactory", "io.trygvis.persistence.test.PersonDao", "io.trygvis.persistence.test.ChildEntityDao"); assertThat(collector.getDiagnostics()).isEmpty(); diff --git a/container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java b/container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java index 85e3741..590b8d0 100644 --- a/container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java +++ b/container-compiler-plugin/src/test/java/io/trygvis/persistence/EntityMirrorTest.java @@ -10,6 +10,7 @@ import org.testng.annotations.Test; import java.io.CharArrayWriter; import java.io.PrintWriter; +import static io.trygvis.container.compiler.Utils.EOL; import static io.trygvis.persistence.FieldMirror.AccessorType.FIELD; import static io.trygvis.persistence.FieldMirror.AccessorType.METHOD; import static io.trygvis.persistence.FieldMirror.FieldType.PRIMITIVE; @@ -84,7 +85,7 @@ public class EntityMirrorTest { new Object[]{new FieldMirror[]{name}, join( "try(java.sql.PreparedStatement stmt = con.prepareStatement(insertIntoSql)) {", " java.lang.String name = o.name;", - " if(name == null) {", + " if (name == null) {", " stmt.setNull(1, java.sql.Types.VARCHAR);", " } else {", " stmt.setString(1, o.name);", @@ -218,7 +219,7 @@ public class EntityMirrorTest { private static String join(String... strings) { StringBuilder buffer = new StringBuilder(); for (String string : strings) { - buffer.append(string).append("\n"); + buffer.append(string).append(EOL); } return buffer.toString(); } |