Skip to content
Snippets Groups Projects
Commit 21e188f9 authored by Daryl's avatar Daryl
Browse files

Added method to unit test for ID

parent 0362b857
No related branches found
No related tags found
No related merge requests found
......@@ -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()
{
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment