Permalink
Browse files

Fixed issue #73

  • Loading branch information...
1 parent 67a5d6f commit 10538e67a06f8c824c32999b6fb70d8f292e149d @dan-g dan-g committed Apr 29, 2012
Showing with 16 additions and 0 deletions.
  1. +1 −0 src/main/java/net/kotek/jdbm/DBAbstract.java
  2. +15 −0 src/test/java/net/kotek/jdbm/DBTest.java
@@ -452,6 +452,7 @@ public void deleteCollection(String name){
throw new InternalError("unknown collection type: "+(o==null?null:o.getClass()));
}
delete(recid);
+ collections.remove(name);
dir.remove(name);
@@ -437,6 +437,21 @@ public void testCollectionSize() throws IOException {
}
+ public void testDeleteAndPutCollection() throws IOException {
+ DB db = newDBNoCache();
+ db = DBMakerTest.newDBCache();
+ Map toAdd = new HashMap() ;
+ toAdd.put("description","test");
+ toAdd.put("descriptio1","test");
+ Map<String,Object> map = db.createHashMap("test");
+ map.putAll(toAdd);
+ db.commit();
+ db.deleteCollection("test");
+ map = db.getHashMap("test");
+ assertNull(map);
+
+ }
+
}

0 comments on commit 10538e6

Please sign in to comment.