@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)); }
@Test public void testGetUid() { Stat stat = new Stat(); stat.setUid(1); assertEquals(1, stat.getUid()); }
@Test public void testGetMode() { Stat stat = new Stat(); stat.setMode(0755 | UnixPermission.S_IFDIR); assertEquals(0755 | UnixPermission.S_IFDIR, stat.getMode()); }
@Test public void testGetGeneration() { Stat stat = new Stat(); stat.setGeneration(1); assertEquals(1, stat.getGeneration()); }