mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 03:09:04 +01:00
Metadata for groups. #221
This commit is contained in:
@@ -533,11 +533,11 @@ public class DatabaseComponentImplTest extends BriarTestCase {
|
||||
final EventBus eventBus = context.mock(EventBus.class);
|
||||
context.checking(new Expectations() {{
|
||||
// Check whether the subscription is in the DB (which it's not)
|
||||
exactly(5).of(database).startTransaction();
|
||||
exactly(7).of(database).startTransaction();
|
||||
will(returnValue(txn));
|
||||
exactly(5).of(database).containsGroup(txn, groupId);
|
||||
exactly(7).of(database).containsGroup(txn, groupId);
|
||||
will(returnValue(false));
|
||||
exactly(5).of(database).abortTransaction(txn);
|
||||
exactly(7).of(database).abortTransaction(txn);
|
||||
// This is needed for getMessageStatus() to proceed
|
||||
exactly(1).of(database).containsContact(txn, contactId);
|
||||
will(returnValue(true));
|
||||
@@ -552,6 +552,13 @@ public class DatabaseComponentImplTest extends BriarTestCase {
|
||||
// Expected
|
||||
}
|
||||
|
||||
try {
|
||||
db.getGroupMetadata(groupId);
|
||||
fail();
|
||||
} catch (NoSuchSubscriptionException expected) {
|
||||
// Expected
|
||||
}
|
||||
|
||||
try {
|
||||
db.getMessageStatus(contactId, groupId);
|
||||
fail();
|
||||
@@ -566,6 +573,13 @@ public class DatabaseComponentImplTest extends BriarTestCase {
|
||||
// Expected
|
||||
}
|
||||
|
||||
try {
|
||||
db.mergeGroupMetadata(groupId, metadata);
|
||||
fail();
|
||||
} catch (NoSuchSubscriptionException expected) {
|
||||
// Expected
|
||||
}
|
||||
|
||||
try {
|
||||
db.removeGroup(group);
|
||||
fail();
|
||||
|
||||
Reference in New Issue
Block a user