mirror of
https://code.briarproject.org/briar/briar.git
synced 2026-02-12 18:59:06 +01:00
Used jMock so extended test class with BriarTestCase.
This commit is contained in:
@@ -11,6 +11,7 @@ import java.util.Set;
|
||||
import java.util.Map.Entry;
|
||||
import java.util.concurrent.Executors;
|
||||
|
||||
import net.sf.briar.BriarTestCase;
|
||||
import net.sf.briar.api.ContactId;
|
||||
import net.sf.briar.api.TransportConfig;
|
||||
import net.sf.briar.api.TransportProperties;
|
||||
@@ -27,7 +28,7 @@ import org.junit.Test;
|
||||
* and CONTACT1_EMAIL - (as recipient email address)
|
||||
*/
|
||||
|
||||
public class GmailPluginTester {
|
||||
public class GmailPluginTester extends BriarTestCase {
|
||||
|
||||
SimplexPluginCallback callback;
|
||||
TransportProperties local, props1;
|
||||
@@ -124,9 +125,11 @@ Map<ContactId,TransportProperties> map = new HashMap<ContactId, TransportPropert
|
||||
@Test
|
||||
public void testGmailSMTP()
|
||||
{
|
||||
Mockery context = new Mockery();
|
||||
GmailPlugin pluginTest = new GmailPlugin(Executors.newSingleThreadExecutor(), callback);
|
||||
assertEquals(true, pluginTest.connectSMTP(test1));
|
||||
assertEquals(false, pluginTest.connectSMTP(new ContactId(7)));
|
||||
context.assertIsSatisfied();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user