GitHub user mureinik opened a pull request:
https://github.com/apache/commons-lang/pull/363
Update builder tests to JUnit Jupiter
Upgrade the tests in the builder package to use JUnit Jupiter as part of
the effort to remove the dependency on the Vintage Engine.
While most of these changes are drop-in replacements with no functional
benefit, it is worth mentioning the change to how expected exceptions are
tested.
Unlike `org.junit.Test`, `org.junit.jupiter.api.Test` does not have an
`expected` argument. Instead, an explicit call to
`org.junit.jupiter.api.Assertions.assertThrows` is used. This call allows the
test to pinpoint the exact statement that is expected to throw the exception
and allows making the tests a bit stricter by preventing
false-positives that could occur if the setup code would throw the expected
exception instead of the statement that was supposed to throw it.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/mureinik/commons-lang junit-jupiter
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/363.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #363
----
commit 0c320dfc356b78145107a4b121d674dbccb84437
Author: Allon Mureinik <mureinik@...>
Date: 2018-10-02T03:41:37Z
Update builder tests to JUnit Jupiter
Upgrade the tests in the builder package to use JUnit Jupiter as part of
the effort to remove the dependency on the Vintage Engine.
While most of these changes are drop-in replacements with no functional
benefit, it is worth mentioning the change to how expected exceptions
are tested.
Unlike org.junit.Test, org.junit.jupiter.api.Test does not have an
"expected" argument. Instead, an explicit call to
org.junit.jupiter.api.Assertions.assertThrows is used. This call allows
the test to pinpoint the exact statement that is expected to throw the
expcetion and allows making the tests a bit stricter by preventing
false-positives that could occur if the setup code would throw the
expected exception instead of the statement that was supposed to throw
it.
----
---