Skip to content
Snippets Groups Projects
Commit 4ab72621 authored by Simon Reis's avatar Simon Reis
Browse files

SI-158 Tests update

parent ebba72ad
No related branches found
No related tags found
No related merge requests found
......@@ -91,19 +91,23 @@ public class EmailManagerTest {
}
@Test
public void testSendMail_invalidRecipient() throws Exception {
EmailManager emailManager = new GfiEmail(null, "emailConfigurationTest/emailTemplates/emailTemplateTestFehlerRecipient.txt", false, this.emailConfig);
assertThrows(MessagingException.class, emailManager::sendEmail);
public void testSendMail_invalidRecipient() {
assertThrows(MessagingException.class, () -> {
EmailManager emailManager = new GfiEmail(null, "emailConfigurationTest/emailTemplates/emailTemplateTestFehlerRecipient.txt", false, this.emailConfig);
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");
EmailManager emailManager = new GfiEmail(null, "emailConfigurationTest/emailTemplates/emailTemplateTestFehlerRecipient.txt", false, emailConfig);
assertThrows(MessagingException.class, emailManager::sendEmail);
assertThrows(MessagingException.class, () -> {
EmailManager emailManager = new GfiEmail(null, "emailConfigurationTest/emailTemplates/emailTemplateTestFehlerRecipient.txt", false, emailConfig);
emailManager.sendEmail();
});
}
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment