Assertions for Wiser SMTP test server from subethamail
129ede848d
Bumps [spring-context-support](https://github.com/spring-projects/spring-framework) from 5.1.1.RELEASE to 5.1.2.RELEASE. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v5.1.1.RELEASE...v5.1.2.RELEASE) Signed-off-by: dependabot[bot] <support@dependabot.com> |
||
---|---|---|
src | ||
.gitignore | ||
.travis.yml | ||
CHANGELOG | ||
Jenkinsfile.groovy | ||
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);
}