summaryrefslogtreecommitdiff
path: root/enigma-cli/src/test/java/cuchaz/enigma/command/CheckMappingsCommandTest.java
blob: a29bba4017b619f52df51404fbe7d3c76f2c2030 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
package cuchaz.enigma.command;

import org.junit.Test;

import java.io.File;

public class CheckMappingsCommandTest {
	private static final String PACKAGE_ACCESS = "../enigma/build/test-obf/packageAccess.jar";

	@Test(expected = IllegalStateException.class)
	public void testWrong() throws Exception {
		new CheckMappingsCommand().run(new File(PACKAGE_ACCESS).getAbsolutePath(), new File("src/test/resources" +
				"/packageAccess/wrongMappings").getAbsolutePath());
	}

	@Test
	public void testRight() throws Exception {
		new CheckMappingsCommand().run(new File(PACKAGE_ACCESS).getAbsolutePath(), new File("src/test/resources" +
				"/packageAccess/correctMappings").getAbsolutePath());
	}
}