mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-18 13:49:53 +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
|
* looks up the contact's email address given the contactID
|
||||||
*
|
|
||||||
* @param ContactId
|
* @param ContactId
|
||||||
*
|
|
||||||
* @return String email
|
* @return String email
|
||||||
*/
|
*/
|
||||||
private String discoverContactEmail(ContactId cid) {
|
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.SimplexTransportReader;
|
||||||
import net.sf.briar.api.plugins.simplex.SimplexTransportWriter;
|
import net.sf.briar.api.plugins.simplex.SimplexTransportWriter;
|
||||||
|
|
||||||
|
import org.jmock.Mockery;
|
||||||
import org.junit.Before;
|
import org.junit.Before;
|
||||||
import org.junit.Test;
|
import org.junit.Test;
|
||||||
|
|
||||||
@@ -93,6 +94,16 @@ Map<ContactId,TransportProperties> map = new HashMap<ContactId, TransportPropert
|
|||||||
callback.setConfig(config);
|
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
|
@Test
|
||||||
public void testPluginFactoryCreation()
|
public void testPluginFactoryCreation()
|
||||||
{
|
{
|
||||||
|
|||||||
Reference in New Issue
Block a user