mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-13 19:29:06 +01:00
Plugin factories can supply clocks for their plugins if needed.
This commit is contained in:
@@ -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();
|
||||
|
||||
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user