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:
Adam
2015-10-14 19:03:32 -04:00
parent c2ee0cdf67
commit 567d8b80ca
6 changed files with 69 additions and 7 deletions

View File

@@ -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

View File

@@ -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
{

View File

@@ -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);
}
}

View 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());
}
}