Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Eclipse Projects
Eclipse openK User Modules
org.eclipse.openk-usermodules.gridFailureInformation.backend
Commits
4ab72621
Commit
4ab72621
authored
Mar 23, 2020
by
Simon Reis
Browse files
SI-158 Tests update
parent
ebba72ad
Changes
1
Hide whitespace changes
Inline
Side-by-side
gfsBackendService/src/test/java/org/eclipse/openk/gridfailureinformation/email/EmailManagerTest.java
View file @
4ab72621
...
...
@@ -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
();
});
}
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment