Assertions for Wiser SMTP test server from subethamail
f53d98299d
Bumps [mockito-core](https://github.com/mockito/mockito) from 3.5.13 to 3.5.15. - [Release notes](https://github.com/mockito/mockito/releases) - [Commits](https://github.com/mockito/mockito/compare/v3.5.13...v3.5.15) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> |
||
---|---|---|
.github | ||
src | ||
.gitignore | ||
CHANGELOG.org | ||
LICENSE.txt | ||
pom.xml | ||
README.md |
wiser-assertions
Assertions for Wiser SMTP test server from subethamail
Origin
Taken from Rafal Browiec WiserAssertions class.
Usage
@Before
public void setUp() throws IOException {
wiser = new Wiser(PORT);
wiser.start();
}
@After
public void tearDown() {
wiser.stop();
}
@Test
public void testMail() {
//given
...
//when
...
//then
WiserAssertions.assertReceivedMessage(wiser)
.from(sender)
.to(recipient_alpha)
.to(recipient_beta)
.withSubjectContains(subject_prefix)
.withSubjectContains(subject_suffix)
.withContentContains(message_element_1)
.withContentContains(message_element_2)
.withContentContains(message_element_3);
}