Add basic index file reader/writer and basic test

This commit is contained in:
Adam
2015-10-12 21:08:46 -04:00
parent ee265a6342
commit 57a55d43e1
3 changed files with 156 additions and 0 deletions

View File

@@ -0,0 +1,20 @@
package net.runelite.cache.fs;
import java.io.File;
import java.io.IOException;
import org.junit.Assert;
import org.junit.Test;
public class IndexFileTest
{
@Test
public void test1() throws IOException
{
File file = new File("d:/rs/07/test/test.dat");
IndexFile index = new IndexFile(5, file);
IndexEntry entry = new IndexEntry(index, 7, 8, 9);
index.write(entry);
IndexEntry entry2 = index.read(7);
Assert.assertEquals(entry, entry2);
}
}