Search in sources :

Example 1 with MailSender

use of com.axway.ats.action.mail.MailSender in project ats-framework by Axway.

the class TransportMock method setUp.

@Before
public void setUp() throws ActionException {
    mailSender = new MailSender();
    mailSender.setMailServer("fake.smtp.host", 25);
    // mock the transport
    transportMock = new TransportMock();
    Whitebox.setInternalState(mailSender, "transport", transportMock);
    // create a message for test purposes
    mail = new MimePackage();
    mail.setRecipient(RecipientType.TO, new String[] { "sender@test.com" });
    mail.setSender("sender@test.com");
}
Also used : MimePackage(com.axway.ats.action.objects.MimePackage) MailSender(com.axway.ats.action.mail.MailSender) Before(org.junit.Before)

Aggregations

MailSender (com.axway.ats.action.mail.MailSender)1 MimePackage (com.axway.ats.action.objects.MimePackage)1 Before (org.junit.Before)1