summaryrefslogtreecommitdiff
path: root/enigma-cli/src/test/java
diff options
context:
space:
mode:
Diffstat (limited to 'enigma-cli/src/test/java')
-rw-r--r--enigma-cli/src/test/java/cuchaz/enigma/command/CheckMappingsCommandTest.java21
1 files changed, 21 insertions, 0 deletions
diff --git a/enigma-cli/src/test/java/cuchaz/enigma/command/CheckMappingsCommandTest.java b/enigma-cli/src/test/java/cuchaz/enigma/command/CheckMappingsCommandTest.java
new file mode 100644
index 0000000..a29bba4
--- /dev/null
+++ b/enigma-cli/src/test/java/cuchaz/enigma/command/CheckMappingsCommandTest.java
@@ -0,0 +1,21 @@
1package cuchaz.enigma.command;
2
3import org.junit.Test;
4
5import java.io.File;
6
7public class CheckMappingsCommandTest {
8 private static final String PACKAGE_ACCESS = "../enigma/build/test-obf/packageAccess.jar";
9
10 @Test(expected = IllegalStateException.class)
11 public void testWrong() throws Exception {
12 new CheckMappingsCommand().run(new File(PACKAGE_ACCESS).getAbsolutePath(), new File("src/test/resources" +
13 "/packageAccess/wrongMappings").getAbsolutePath());
14 }
15
16 @Test
17 public void testRight() throws Exception {
18 new CheckMappingsCommand().run(new File(PACKAGE_ACCESS).getAbsolutePath(), new File("src/test/resources" +
19 "/packageAccess/correctMappings").getAbsolutePath());
20 }
21}