@Test public void fileaccess_03() { Block b1 = data(file, blkSize) ; file.write(b1) ; long x = b1.getId() ; Block b9 = file.read(x) ; assertNotSame(b1, b9) ; assertTrue(sameValue(b1, b9)) ; b9 = file.read(x) ; assertNotSame(b1, b9) ; assertTrue(sameValue(b1, b9)) ; }
@Before public void before() { file = make() ; } @After public void after() { file.close() ; }
@Test public void fileaccess_01() { assertTrue(file.isEmpty()) ; }
@Test public void fileaccess_02() { Block b = data(file, blkSize) ; file.write(b) ; }
@Test public void fileaccess_01() { assertTrue(file.isEmpty()) ; }
@Test public void fileaccess_03() { Block b1 = data(file, blkSize) ; file.write(b1) ; long x = b1.getId() ; Block b9 = file.read(x) ; assertNotSame(b1, b9) ; assertTrue(sameValue(b1, b9)) ; b9 = file.read(x) ; assertNotSame(b1, b9) ; assertTrue(sameValue(b1, b9)) ; }
@Test public void fileaccess_02() { Block b = data(file, blkSize) ; file.write(b) ; }
@Before public void before() { file = make() ; } @After public void after() { file.close() ; }
@Test public void fileaccess_04() { Block b1 = data(file, blkSize) ; Block b2 = data(file, blkSize) ; file.write(b1) ; file.write(b2) ; long x = b1.getId() ; Block b8 = file.read(b1.getId()) ; Block b9 = file.read(b1.getId()) ; assertNotSame(b8, b9) ; assertTrue(b8.getId() == b9.getId()) ; }
@Test public void fileaccess_04() { Block b1 = data(file, blkSize) ; Block b2 = data(file, blkSize) ; file.write(b1) ; file.write(b2) ; long x = b1.getId() ; Block b8 = file.read(b1.getId()) ; Block b9 = file.read(b1.getId()) ; assertNotSame(b8, b9) ; assertTrue(b8.getId() == b9.getId()) ; }