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

Method testGetKeyCount

java/unittests/DatabaseTest.java:173–196  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

171 }
172
173 public void testGetKeyCount() {
174 byte[] k = new byte[5];
175 byte[] r = new byte[5];
176 Database db;
177 Environment env = new Environment();
178 try {
179 env.create("jtest.db");
180 db = env.createDatabase((short)1);
181 assertEquals(0, db.getCount());
182 db.insert(k, r);
183 assertEquals(1, db.getCount());
184 k[0] = 1;
185 db.insert(k, r);
186 assertEquals(2, db.getCount());
187 k[0] = 2;
188 db.insert(k, r);
189 assertEquals(3, db.getCount());
190 db.close();
191 }
192 catch (DatabaseException err) {
193 fail("Exception "+err);
194 }
195 env.close();
196 }
197
198 public void testBulkOperations() {
199 byte[] k1 = new byte[] {0x11};

Callers

nothing calls this directly

Calls 6

createMethod · 0.95
createDatabaseMethod · 0.95
getCountMethod · 0.95
insertMethod · 0.95
closeMethod · 0.95
closeMethod · 0.95

Tested by

no test coverage detected