This actually does work if you don't try to load encrypted archives. Begin work to allow saving/loading in memory for tests. woo.
This commit is contained in:
@@ -4,6 +4,7 @@ import java.io.File;
|
||||
import java.io.IOException;
|
||||
import java.nio.ByteBuffer;
|
||||
import org.junit.Assert;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
@@ -12,6 +13,12 @@ public class DataFileTest
|
||||
{
|
||||
@Rule
|
||||
public TemporaryFolder folder = new TemporaryFolder();
|
||||
|
||||
@BeforeClass
|
||||
public static void before()
|
||||
{
|
||||
System.setProperty("java.io.tmpdir", "d:/temp");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test1() throws IOException
|
||||
|
||||
@@ -3,6 +3,7 @@ package net.runelite.cache.fs;
|
||||
import java.io.File;
|
||||
import java.io.IOException;
|
||||
import org.junit.Assert;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
@@ -12,6 +13,12 @@ public class IndexFileTest
|
||||
@Rule
|
||||
public TemporaryFolder folder = new TemporaryFolder();
|
||||
|
||||
@BeforeClass
|
||||
public static void before()
|
||||
{
|
||||
System.setProperty("java.io.tmpdir", "d:/temp");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void test1() throws IOException
|
||||
{
|
||||
|
||||
@@ -8,7 +8,8 @@ public class StoreLoadTest
|
||||
@Test
|
||||
public void test() throws IOException
|
||||
{
|
||||
Store store = new Store(new java.io.File("c:/rs/cache"));
|
||||
Store store = new Store(new java.io.File("d:/rs/07/cache"));//c:/rs/cache"));
|
||||
store.load();
|
||||
System.out.println(store);
|
||||
}
|
||||
}
|
||||
|
||||
25
src/test/java/net/runelite/cache/fs/StoreTest.java
vendored
Normal file
25
src/test/java/net/runelite/cache/fs/StoreTest.java
vendored
Normal file
@@ -0,0 +1,25 @@
|
||||
package net.runelite.cache.fs;
|
||||
|
||||
import java.io.IOException;
|
||||
import org.junit.BeforeClass;
|
||||
import org.junit.Rule;
|
||||
import org.junit.Test;
|
||||
import org.junit.rules.TemporaryFolder;
|
||||
|
||||
public class StoreTest
|
||||
{
|
||||
@Rule
|
||||
public TemporaryFolder folder = new TemporaryFolder();
|
||||
|
||||
@BeforeClass
|
||||
public static void before()
|
||||
{
|
||||
System.setProperty("java.io.tmpdir", "d:/temp");
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testCreate() throws IOException
|
||||
{
|
||||
Store store = new Store(folder.getRoot());
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user