diff options
Diffstat (limited to 'test/delombok')
-rw-r--r-- | test/delombok/src/lombok/delombok/TestLombokFiles.java | 16 | ||||
-rw-r--r-- | test/delombok/src/lombok/delombok/TestSourceFiles.java | 38 |
2 files changed, 19 insertions, 35 deletions
diff --git a/test/delombok/src/lombok/delombok/TestLombokFiles.java b/test/delombok/src/lombok/delombok/TestLombokFiles.java index 1d93a4b2..66e3580e 100644 --- a/test/delombok/src/lombok/delombok/TestLombokFiles.java +++ b/test/delombok/src/lombok/delombok/TestLombokFiles.java @@ -23,16 +23,20 @@ package lombok.delombok; import java.io.File; +import lombok.DirectoryRunner; import lombok.TestViaDelombok; -import org.junit.Test; +import org.junit.runner.RunWith; +@RunWith(DirectoryRunner.class) public class TestLombokFiles { - private static final File BEFORE_DIR = new File("test/lombok/resource/before"); - private static final File AFTER_DIR = new File("test/lombok/resource/after"); - @Test - public void testSources() throws Exception { - TestViaDelombok.runComparison(BEFORE_DIR, AFTER_DIR); + public static File getBeforeDirectory() { + TestViaDelombok.printErrors(true); + return new File("test/lombok/resource/before"); + } + + public static File getAfterDirectory() { + return new File("test/lombok/resource/after"); } } diff --git a/test/delombok/src/lombok/delombok/TestSourceFiles.java b/test/delombok/src/lombok/delombok/TestSourceFiles.java index fc2a9cab..2c0085eb 100644 --- a/test/delombok/src/lombok/delombok/TestSourceFiles.java +++ b/test/delombok/src/lombok/delombok/TestSourceFiles.java @@ -21,39 +21,19 @@ */ package lombok.delombok; -import lombok.ReflectionFileTester; +import java.io.File; -import org.junit.BeforeClass; -import org.junit.Test; +import lombok.DirectoryRunner; +import org.junit.runner.RunWith; + +@RunWith(DirectoryRunner.class) public class TestSourceFiles { - 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(); + public static File getBeforeDirectory() { + return new File("test/delombok/resource/before"); } - @Test - public void testWithComments() throws Exception { - tester.test(); + public static File getAfterDirectory() { + return new File("test/delombok/resource/after"); } } |