Migrate tests to AssertJ
Mostly thanks to IDEA's plugin: https://plugins.jetbrains.com/plugin/10345-assertions2assertj There is still a lot of work to do when complex and composite matchers are used. * Add `awaitility` dependency and deprecate `EventuallyMatcher` in favor of `awaitility` * Remove Hamcrest from dependencies and disable JUnit & Hamcrest static imports to encourage to use only AssertJ * Migrate JUnit assumptions in rules to AssertJ's assumptions * Deprecate some custom matchers in favor of existing in Hamcrest after upgrading the last to version `2.1` * Replace `ExpectedException` rules with `assertThatThrownBy()` * Mention `MessagePredicate` in the `testing.adoc`
This commit is contained in:
@@ -227,6 +227,11 @@ assertThat(channel.send(message), is(false));
|
||||
----
|
||||
====
|
||||
|
||||
==== AssertJ conditions and predicates
|
||||
|
||||
Starting with version 5.2, the `MessagePredicate` is introduced to be used in the AssertJ `matches()` assertion.
|
||||
It requires a `Message` object as an expectation.
|
||||
And also ot can be configured with headers to exclude from expectation as well as from actual message to assert.
|
||||
|
||||
|
||||
[[test-context]]
|
||||
|
||||
Reference in New Issue
Block a user