Init of store loading, what is datafile id

This commit is contained in:
Adam
2015-10-13 09:59:37 -04:00
parent 4f1f75c88f
commit 2e118bb391
3 changed files with 35 additions and 4 deletions

View File

@@ -17,7 +17,7 @@ public class DataFileTest
public void test1() throws IOException
{
File file = folder.newFile();
Store store = new Store();
Store store = new Store(folder.getRoot());
DataFile df = new DataFile(store, 42, file);
int sector = df.write(3, ByteBuffer.wrap("test".getBytes()));
ByteBuffer buf = df.read(3, sector, 4);
@@ -33,7 +33,7 @@ public class DataFileTest
for (int i = 0; i < 1024; ++i) b[i] = (byte) i;
File file = folder.newFile();
Store store = new Store();
Store store = new Store(folder.getRoot());
DataFile df = new DataFile(store, 42, file);
int sector = df.write(0x1FFFF, ByteBuffer.wrap(b));
ByteBuffer buf = df.read(0x1FFFF, sector, b.length);

View File

@@ -16,7 +16,7 @@ public class IndexFileTest
public void test1() throws IOException
{
File file = folder.newFile();
Store store = new Store();
Store store = new Store(folder.getRoot());
IndexFile index = new IndexFile(store, 5, file);
IndexEntry entry = new IndexEntry(index, 7, 8, 9);
index.write(entry);