Skip to content

v1.1.0 - Assert expected exception messages

Latest
Compare
Choose a tag to compare
@draekien draekien released this 30 Jul 00:27
· 6 commits to main since this release

This update introduces the ability to specify an expected exception message when constructing the unit test for a constructor.
This replaces the previous usage of the string passed to the Throws method.

The new usage is:

.Throws<ArgumentNullException>("Value cannot be null. (Parameter 'mediator')")

Where the message is the expected exception message to be thrown. If the exception message received by the test runner differs from the provided message, the test case will fail.