}
public void testGetRecordSet()
throws Exception {
assertTrue(filer.writeRecord(TEST_KEY, TEST_VALUE));
assertTrue(filer.writeRecord(new Key("test2"), TEST_VALUE_2));
assertTrue(filer.writeRecord(new Key("test3"), TEST_VALUE_3));
RecordSet result = filer.getRecordSet();
assertNotNull(result);
List results = new Vector();
while (result.hasMoreRecords()) {
results.add(result.getNextRecord().getValue());
}
assertEquals(3, results.size());
assertTrue(results.contains(TEST_VALUE));
assertTrue(results.contains(TEST_VALUE_2));
assertTrue(results.contains(TEST_VALUE_3));
assertTrue(filer.deleteRecord(TEST_KEY));
assertTrue(filer.deleteRecord(new Key("test2")));
assertTrue(filer.deleteRecord(new Key("test3")));
result = filer.getRecordSet();
assertTrue(!result.hasMoreRecords());
}