BSFile uses a wrapper for DiskBlock to add BSFile specific stuff
This keeps the DiskBlock class clean, so that it can be used for PersistentMap.
This commit is contained in:
@@ -6,6 +6,7 @@ import java.nio.file.Path;
|
||||
|
||||
import org.lucares.pdb.diskstorage.DiskStorage;
|
||||
import org.lucares.utils.file.FileUtils;
|
||||
import org.testng.Assert;
|
||||
import org.testng.annotations.AfterMethod;
|
||||
import org.testng.annotations.BeforeMethod;
|
||||
import org.testng.annotations.Test;
|
||||
@@ -31,8 +32,11 @@ public class PersistentMapTest {
|
||||
try (final DiskStorage ds = new DiskStorage(file)) {
|
||||
final PersistentMap map = new PersistentMap(ds);
|
||||
|
||||
map.put("key1", "value1");
|
||||
map.getAsString("key1");
|
||||
final String value1 = "value1";
|
||||
map.put("key1", value1);
|
||||
final String actualValue1 = map.getAsString("key1");
|
||||
|
||||
Assert.assertEquals(actualValue1, value1);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user