Commit 4ab72621 authored by Simon Reis's avatar Simon Reis
Browse files

SI-158 Tests update

parent ebba72ad
......@@ -91,19 +91,23 @@ public class EmailManagerTest {
}
@Test
public void testSendMail_invalidRecipient() throws Exception {
public void testSendMail_invalidRecipient() {
assertThrows(MessagingException.class, () -> {
EmailManager emailManager = new GfiEmail(null, "emailConfigurationTest/emailTemplates/emailTemplateTestFehlerRecipient.txt", false, this.emailConfig);
assertThrows(MessagingException.class, emailManager::sendEmail);
emailManager.sendEmail();
});
}
@Test
public void testSendMail_invalidSender() throws Exception {
public void testSendMail_invalidSender() {
EmailConfig emailConfig = new EmailConfig();
emailConfig.setSmtpHost("localhost");
emailConfig.setEmailPort("3025");
emailConfig.setSender("testCaseSendertest.de");
assertThrows(MessagingException.class, () -> {
EmailManager emailManager = new GfiEmail(null, "emailConfigurationTest/emailTemplates/emailTemplateTestFehlerRecipient.txt", false, emailConfig);
assertThrows(MessagingException.class, emailManager::sendEmail);
emailManager.sendEmail();
});
}
}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment