Assertions for Wiser SMTP test server from subethamail
Paul Campbell
ac18fbb2d5
* github/build: verify javadoc validity * github/build: stop testing against JDK 8 * github/build: test against JDK 16 and 17-ea Drop testing against JDK 15 * github/deploy: remove graphviz * github.deploy: nexus username is not a secret * github/settings: nexus username is not a secret * github/deploy: publish javadoc To: https://kemitix.github.io/wiser-assertions/ * github/build: upgrade setup-java action to 2.1.0 * github/deploy: upgrade setup-java action to 2.1.0 |
||
---|---|---|
.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);
}