Add basic index file reader/writer and basic test
This commit is contained in:
20
src/test/java/net/runelite/cache/fs/IndexFileTest.java
vendored
Normal file
20
src/test/java/net/runelite/cache/fs/IndexFileTest.java
vendored
Normal 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);
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user