Removed getCapacity() from BatchWriter interface.

This commit is contained in:
akwizgran
2011-09-21 12:37:19 +01:00
parent 7ac615520b
commit 95c3fb4fed
4 changed files with 11 additions and 21 deletions

View File

@@ -25,6 +25,7 @@ import net.sf.briar.api.protocol.GroupId;
import net.sf.briar.api.protocol.Message;
import net.sf.briar.api.protocol.MessageId;
import net.sf.briar.api.protocol.Offer;
import net.sf.briar.api.protocol.ProtocolConstants;
import net.sf.briar.api.protocol.SubscriptionUpdate;
import net.sf.briar.api.protocol.TransportUpdate;
import net.sf.briar.api.protocol.writers.AckWriter;
@@ -41,8 +42,6 @@ import org.junit.Test;
public abstract class DatabaseComponentTest extends TestCase {
private static final int ONE_MEGABYTE = 1024 * 1024;
protected final Object txn = new Object();
protected final AuthorId authorId;
protected final BatchId batchId;
@@ -740,9 +739,8 @@ public abstract class DatabaseComponentTest extends TestCase {
allowing(database).containsContact(txn, contactId);
will(returnValue(true));
// Get the sendable messages
oneOf(batchWriter).getCapacity();
will(returnValue(ONE_MEGABYTE));
oneOf(database).getSendableMessages(txn, contactId, ONE_MEGABYTE);
oneOf(database).getSendableMessages(txn, contactId,
ProtocolConstants.MAX_PACKET_LENGTH);
will(returnValue(sendable));
// Try to add both messages to the writer - only manage to add one
oneOf(database).getMessage(txn, messageId);