Search in sources :

Example 6 with ScriptMailResult

use of org.xwiki.mail.script.ScriptMailResult in project xwiki-platform by xwiki.

the class MailStorageScriptServiceTest method resend.

@Test
public void resend() throws Exception {
    MailResender resender = this.mocker.getInstance(MailResender.class, "database");
    MailStatusResult statusResult = mock(MailStatusResult.class);
    when(resender.resendAsynchronously("batchId", "messageId")).thenReturn(statusResult);
    ScriptMailResult result = this.mocker.getComponentUnderTest().resend("batchId", "messageId");
    assertEquals("batchId", result.getBatchId());
    assertNotNull(result.getStatusResult());
}
Also used : ScriptMailResult(org.xwiki.mail.script.ScriptMailResult) Test(org.junit.Test)

Aggregations

Test (org.junit.Test)6 ScriptMailResult (org.xwiki.mail.script.ScriptMailResult)6 ServerSetupTest (com.icegreen.greenmail.util.ServerSetupTest)2 Map (java.util.Map)2 BodyPart (javax.mail.BodyPart)2 MimeMessage (javax.mail.internet.MimeMessage)2 MimeMultipart (javax.mail.internet.MimeMultipart)2 ScriptMimeMessage (org.xwiki.mail.script.ScriptMimeMessage)2 InputStream (java.io.InputStream)1 ArrayList (java.util.ArrayList)1 ImmutablePair (org.apache.commons.lang3.tuple.ImmutablePair)1 Pair (org.apache.commons.lang3.tuple.Pair)1