aboutsummaryrefslogtreecommitdiff
path: root/test/delombok
diff options
context:
space:
mode:
authorRoel Spilker <r.spilker@gmail.com>2009-11-28 00:15:58 +0100
committerRoel Spilker <r.spilker@gmail.com>2009-11-28 00:15:58 +0100
commite67e9e14dcc0f3754c3a42e6b4d039a7aa04db1a (patch)
tree8fd89cfe424afef68363a5626f529c4b569b2652 /test/delombok
parente10d58efdafd5911398d2f68a2e0de3bcf25f389 (diff)
downloadlombok-e67e9e14dcc0f3754c3a42e6b4d039a7aa04db1a.tar.gz
lombok-e67e9e14dcc0f3754c3a42e6b4d039a7aa04db1a.tar.bz2
lombok-e67e9e14dcc0f3754c3a42e6b4d039a7aa04db1a.zip
Added support for running unit tests using the method name to determine the file to test
Diffstat (limited to 'test/delombok')
-rw-r--r--test/delombok/resource/after/ForLoop.java2
-rw-r--r--test/delombok/resource/after/WithComments.java1
-rw-r--r--test/delombok/src/lombok/delombok/TestSourceFiles.java35
3 files changed, 28 insertions, 10 deletions
diff --git a/test/delombok/resource/after/ForLoop.java b/test/delombok/resource/after/ForLoop.java
index 609549b7..615f6e8a 100644
--- a/test/delombok/resource/after/ForLoop.java
+++ b/test/delombok/resource/after/ForLoop.java
@@ -1,6 +1,4 @@
-
public class ForLoop {
-
public static void main(String[] args) {
// before loop
for (int i = 0; i < 10; i++) {
diff --git a/test/delombok/resource/after/WithComments.java b/test/delombok/resource/after/WithComments.java
index 59cc97c4..684dcc8e 100644
--- a/test/delombok/resource/after/WithComments.java
+++ b/test/delombok/resource/after/WithComments.java
@@ -1,5 +1,4 @@
// Cool Comments
-
public class WithComments {
// Also inside the body
} \ No newline at end of file
diff --git a/test/delombok/src/lombok/delombok/TestSourceFiles.java b/test/delombok/src/lombok/delombok/TestSourceFiles.java
index a5df5197..fc2a9cab 100644
--- a/test/delombok/src/lombok/delombok/TestSourceFiles.java
+++ b/test/delombok/src/lombok/delombok/TestSourceFiles.java
@@ -21,18 +21,39 @@
*/
package lombok.delombok;
-import java.io.File;
-
-import lombok.TestViaDelombok;
+import lombok.ReflectionFileTester;
+import org.junit.BeforeClass;
import org.junit.Test;
public class TestSourceFiles {
- private static final File BEFORE_DIR = new File("test/delombok/resource/before");
- private static final File AFTER_DIR = new File("test/delombok/resource/after");
+ private static final String AFTER = "test/delombok/resource/after";
+ private static final String BEFORE = "test/delombok/resource/before";
+
+ private static final ReflectionFileTester tester = new ReflectionFileTester(BEFORE, AFTER);
+
+ @BeforeClass
+ public static void verify() {
+ tester.verify(TestSourceFiles.class);
+ }
+
+ @Test
+ public void testAnnotation() throws Exception {
+ tester.test();
+ }
+
+ @Test
+ public void testCast() throws Exception {
+ tester.test();
+ }
+
+ @Test
+ public void testForLoop() throws Exception {
+ tester.test();
+ }
@Test
- public void testSources() throws Exception {
- TestViaDelombok.runComparison(BEFORE_DIR, AFTER_DIR);
+ public void testWithComments() throws Exception {
+ tester.test();
}
}