示例#1
0
 @Test
 public void testStat() {
   db.put(new byte[] {1}, new byte[] {1});
   db.put(new byte[] {2}, new byte[] {1});
   Stat stat = db.stat();
   System.out.println(stat);
   assertThat(stat.getEntries(), is(2L));
   assertThat(stat.getPsize(), is(not(0L)));
   assertThat(stat.getOverflowPages(), is(0L));
   assertThat(stat.getDepth(), is(1L));
   assertThat(stat.getLeafPages(), is(1L));
 }
示例#2
0
 @Test
 public void testGetUid() {
   Stat stat = new Stat();
   stat.setUid(1);
   assertEquals(1, stat.getUid());
 }
示例#3
0
 @Test
 public void testGetMode() {
   Stat stat = new Stat();
   stat.setMode(0755 | UnixPermission.S_IFDIR);
   assertEquals(0755 | UnixPermission.S_IFDIR, stat.getMode());
 }
示例#4
0
 @Test
 public void testGetGeneration() {
   Stat stat = new Stat();
   stat.setGeneration(1);
   assertEquals(1, stat.getGeneration());
 }