Commit 21e188f9 authored by Daryl's avatar Daryl

Added method to unit test for ID

parent 0362b857
......@@ -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()
{
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment