Added method for deleting metadata.

This commit is contained in:
akwizgran
2016-02-10 13:58:46 +00:00
parent 00275e260f
commit a91d500263
6 changed files with 71 additions and 3 deletions

View File

@@ -939,6 +939,17 @@ public class H2DatabaseTest extends BriarTestCase {
assertTrue(retrieved.containsKey("baz"));
assertArrayEquals(metadata.get("baz"), retrieved.get("baz"));
// Delete the metadata
db.deleteMessageMetadata(txn, messageId);
// Retrieve the metadata again
retrieved = db.getMessageMetadata(txn, messageId);
assertTrue(retrieved.isEmpty());
// Retrieve the metadata for the group again
all = db.getMessageMetadata(txn, groupId);
assertTrue(all.isEmpty());
db.commitTransaction(txn);
db.close();
}