Assertions for Wiser SMTP test server from subethamail
62e67fe15b
* Bump spring-context-support from 5.1.4.RELEASE to 5.1.5.RELEASE Bumps [spring-context-support](https://github.com/spring-projects/spring-framework) from 5.1.4.RELEASE to 5.1.5.RELEASE. - [Release notes](https://github.com/spring-projects/spring-framework/releases) - [Commits](https://github.com/spring-projects/spring-framework/compare/v5.1.4.RELEASE...v5.1.5.RELEASE) Signed-off-by: dependabot[bot] <support@dependabot.com> * [changelog] updated |
||
---|---|---|
src | ||
.gitignore | ||
CHANGELOG.org | ||
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);
}