MCPcopy Create free account
hub / github.com/cruppstahl/upscaledb / testOverwrite

Method testOverwrite

java/unittests/CursorTest.java:223–240  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

221 }
222
223 public void testOverwrite() {
224 byte[] key = new byte[10];
225 byte[] record1 = new byte[10];
226 byte[] record2 = new byte[10];
227 record1[0] = 0x14;
228 record2[0] = 0x15;
229 try {
230 Cursor c = new Cursor(m_db);
231 m_db.insert(key, record1);
232 c.moveFirst();
233 c.overwrite(record2);
234 byte[] r2 = c.getRecord();
235 assertByteArrayEquals(record2, r2);
236 }
237 catch (DatabaseException err) {
238 fail("DatabaseException "+err.getMessage());
239 }
240 }
241
242 public void testFind() {
243 byte[] key = new byte[10];

Callers

nothing calls this directly

Calls 6

moveFirstMethod · 0.95
overwriteMethod · 0.95
getRecordMethod · 0.95
assertByteArrayEqualsMethod · 0.95
insertMethod · 0.45
getMessageMethod · 0.45

Tested by

no test coverage detected