mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Added method to unit test for ID
This commit is contained in:
@@ -239,9 +239,7 @@ public class GmailPlugin implements SimplexPlugin {
|
||||
|
||||
/*
|
||||
* looks up the contact's email address given the contactID
|
||||
*
|
||||
* @param ContactId
|
||||
*
|
||||
* @return String email
|
||||
*/
|
||||
private String discoverContactEmail(ContactId cid) {
|
||||
|
||||
@@ -18,6 +18,7 @@ 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 org.jmock.Mockery;
|
||||
import org.junit.Before;
|
||||
import org.junit.Test;
|
||||
|
||||
@@ -93,6 +94,16 @@ Map<ContactId,TransportProperties> map = new HashMap<ContactId, TransportPropert
|
||||
callback.setConfig(config);
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testGetID()
|
||||
{
|
||||
Mockery context = new Mockery();
|
||||
GmailPlugin pluginTest = new GmailPlugin(Executors.newSingleThreadExecutor(), callback);
|
||||
pluginTest.getId();
|
||||
assertArrayEquals(GmailPlugin.TRANSPORT_ID,pluginTest.getId().getBytes());
|
||||
context.assertIsSatisfied();
|
||||
}
|
||||
|
||||
@Test
|
||||
public void testPluginFactoryCreation()
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user