mirror of
https://github.com/revanced/Apktool.git
synced 2024-12-13 06:17:46 +01:00
move unit test to @beforeClass and test its output as a separate test, due to parallel test running
This commit is contained in:
parent
6b173146ac
commit
0919fe5322
@ -41,6 +41,16 @@ 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);
|
||||||
|
|
||||||
|
LOGGER.info("Building testapp.apk...");
|
||||||
|
File testApk = new File(sTmpDir, "testapp.apk");
|
||||||
|
new Androlib().build(sTestOrigDir, testApk,
|
||||||
|
BuildAndDecodeTest.returnStock(),"");
|
||||||
|
|
||||||
|
LOGGER.info("Decoding testapp.apk...");
|
||||||
|
ApkDecoder apkDecoder = new ApkDecoder(testApk);
|
||||||
|
apkDecoder.setOutDir(sTestNewDir);
|
||||||
|
apkDecoder.decode();
|
||||||
}
|
}
|
||||||
|
|
||||||
@AfterClass
|
@AfterClass
|
||||||
@ -48,25 +58,16 @@ public class BuildAndDecodeTest {
|
|||||||
OS.rmdir(sTmpDir);
|
OS.rmdir(sTmpDir);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Test
|
||||||
|
public void buildAndDecodeTest() throws BrutException {
|
||||||
|
assertTrue(sTestNewDir.hashCode() == sTestNewDir.hashCode());
|
||||||
|
}
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void isAaptInstalledTest() throws Exception {
|
public void isAaptInstalledTest() throws Exception {
|
||||||
assertEquals(true, isAaptPresent());
|
assertEquals(true, isAaptPresent());
|
||||||
}
|
}
|
||||||
|
|
||||||
@Test
|
|
||||||
public void encodeAndDecodeTest() throws BrutException, IOException {
|
|
||||||
|
|
||||||
LOGGER.info("Building testapp.apk...");
|
|
||||||
File testApk = new File(sTmpDir, "testapp.apk");
|
|
||||||
new Androlib().build(sTestOrigDir, testApk,
|
|
||||||
BuildAndDecodeTest.returnStock(),"");
|
|
||||||
|
|
||||||
LOGGER.info("Decoding testapp.apk...");
|
|
||||||
ApkDecoder apkDecoder = new ApkDecoder(testApk);
|
|
||||||
apkDecoder.setOutDir(sTestNewDir);
|
|
||||||
apkDecoder.decode();
|
|
||||||
}
|
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
public void valuesAnimsTest() throws BrutException {
|
public void valuesAnimsTest() throws BrutException {
|
||||||
compareValuesFiles("values-mcc001/anims.xml");
|
compareValuesFiles("values-mcc001/anims.xml");
|
||||||
|
Loading…
Reference in New Issue
Block a user