Plugin factories can supply clocks for their plugins if needed.

This commit is contained in:
akwizgran
2012-09-06 17:35:52 +01:00
parent 960ead0247
commit 59dc065c55
10 changed files with 15 additions and 29 deletions

View File

@@ -13,7 +13,6 @@ import net.sf.briar.api.protocol.TransportId;
import net.sf.briar.api.protocol.TransportIndex;
import net.sf.briar.api.transport.ConnectionDispatcher;
import net.sf.briar.api.ui.UiCallback;
import net.sf.briar.clock.SystemClock;
import org.jmock.Expectations;
import org.jmock.Mockery;
@@ -48,8 +47,8 @@ public class PluginManagerImplTest extends BriarTestCase {
oneOf(poller).stop();
}});
ExecutorService executor = Executors.newCachedThreadPool();
PluginManagerImpl p = new PluginManagerImpl(executor, new SystemClock(),
db, poller, dispatcher, uiCallback);
PluginManagerImpl p = new PluginManagerImpl(executor, db, poller,
dispatcher, uiCallback);
// We expect either 3 or 4 plugins to be started, depending on whether
// the test machine has a Bluetooth device
int started = p.start();

View File

@@ -14,7 +14,6 @@ import net.sf.briar.api.TransportProperties;
import net.sf.briar.api.plugins.simplex.SimplexPluginCallback;
import net.sf.briar.api.plugins.simplex.SimplexTransportReader;
import net.sf.briar.api.plugins.simplex.SimplexTransportWriter;
import net.sf.briar.clock.SystemClock;
import org.junit.Before;
import org.junit.Test;
@@ -102,8 +101,7 @@ Map<ContactId,TransportProperties> map = new HashMap<ContactId, TransportPropert
public void testPluginFactoryCreation()
{
GmailPluginFactory plugin = new GmailPluginFactory();
plugin.createPlugin(Executors.newSingleThreadExecutor(),
new SystemClock(), callback);
plugin.createPlugin(Executors.newSingleThreadExecutor(), callback);
}
@Test