Readers, writers and factories for subscription and transport updates.

This commit is contained in:
akwizgran
2011-07-23 21:46:47 +01:00
parent 30271c14ce
commit 941460e3bc
34 changed files with 423 additions and 53 deletions
@@ -464,9 +464,9 @@ public abstract class DatabaseComponentTest extends TestCase {
oneOf(database).getBatchesToAck(txn, contactId);
will(returnValue(twoAcks));
// Try to add both batches to the writer - only manage to add one
oneOf(ackWriter).addBatchId(batchId);
oneOf(ackWriter).writeBatchId(batchId);
will(returnValue(true));
oneOf(ackWriter).addBatchId(batchId1);
oneOf(ackWriter).writeBatchId(batchId1);
will(returnValue(false));
oneOf(ackWriter).finish();
// Record the batch that was acked
+3 -2
View File
@@ -28,6 +28,7 @@ import net.sf.briar.api.protocol.Message;
import net.sf.briar.api.protocol.MessageId;
import net.sf.briar.crypto.CryptoModule;
import net.sf.briar.protocol.ProtocolModule;
import net.sf.briar.serial.SerialModule;
import org.apache.commons.io.FileSystemUtils;
import org.junit.After;
@@ -62,8 +63,8 @@ public class H2DatabaseTest extends TestCase {
public H2DatabaseTest() throws Exception {
super();
Injector i = Guice.createInjector(new ProtocolModule(),
new CryptoModule());
Injector i = Guice.createInjector(new CryptoModule(),
new ProtocolModule(), new SerialModule());
groupFactory = i.getInstance(GroupFactory.class);
authorId = new AuthorId(TestUtils.getRandomId());
batchId = new BatchId(TestUtils.getRandomId());