Method injection works, need to @Import annotate stuff though probably.

This commit is contained in:
Adam
2016-03-06 15:28:11 -05:00
parent bb81dcf260
commit c6d3620ab7
7 changed files with 89 additions and 21 deletions

View File

@@ -10,19 +10,34 @@ import java.io.IOException;
import net.runelite.deob.ClassGroup;
import net.runelite.deob.runeloader.MappingImporter;
import net.runelite.deob.util.JarUtil;
import org.junit.After;
import org.junit.Before;
import org.junit.Test;
public class InjectTest
{
private static final File DEOBFUSCATED = new File("d:/rs/07/adamin.jar");
private static final File VANILLA = new File(MappingImporter.class.getResource("/gamepack_v16.jar").getFile());
private static final File OUT = new File("d:/rs/07/adamout.jar");
private ClassGroup deob, vanilla;
@Before
public void before() throws IOException
{
deob = JarUtil.loadJar(DEOBFUSCATED);
vanilla = JarUtil.loadJar(VANILLA);
}
@After
public void after() throws IOException
{
JarUtil.saveJar(vanilla, OUT);
}
@Test
public void testRun() throws IOException
public void testRun()
{
ClassGroup deob = JarUtil.loadJar(DEOBFUSCATED),
vanilla = JarUtil.loadJar(VANILLA);
Inject instance = new Inject(deob, vanilla);
instance.run();
}