move unit test to @beforeClass and test its output as a separate test, due to parallel test running

This commit is contained in:
Connor Tumbleson 2013-07-08 13:24:33 -05:00
parent 6b173146ac
commit 0919fe5322

View File

@ -41,20 +41,6 @@ public class BuildAndDecodeTest {
LOGGER.info("Unpacking testapp..."); LOGGER.info("Unpacking testapp...");
TestUtils.copyResourceDir(BuildAndDecodeTest.class, TestUtils.copyResourceDir(BuildAndDecodeTest.class,
"brut/apktool/testapp/", sTestOrigDir); "brut/apktool/testapp/", sTestOrigDir);
}
@AfterClass
public static void afterClass() throws BrutException {
OS.rmdir(sTmpDir);
}
@Test
public void isAaptInstalledTest() throws Exception {
assertEquals(true, isAaptPresent());
}
@Test
public void encodeAndDecodeTest() throws BrutException, IOException {
LOGGER.info("Building testapp.apk..."); LOGGER.info("Building testapp.apk...");
File testApk = new File(sTmpDir, "testapp.apk"); File testApk = new File(sTmpDir, "testapp.apk");
@ -67,6 +53,21 @@ public class BuildAndDecodeTest {
apkDecoder.decode(); apkDecoder.decode();
} }
@AfterClass
public static void afterClass() throws BrutException {
OS.rmdir(sTmpDir);
}
@Test
public void buildAndDecodeTest() throws BrutException {
assertTrue(sTestNewDir.hashCode() == sTestNewDir.hashCode());
}
@Test
public void isAaptInstalledTest() throws Exception {
assertEquals(true, isAaptPresent());
}
@Test @Test
public void valuesAnimsTest() throws BrutException { public void valuesAnimsTest() throws BrutException {
compareValuesFiles("values-mcc001/anims.xml"); compareValuesFiles("values-mcc001/anims.xml");