[GitHub] commons-lang pull request #369: Update reflect tests to JUnit Jupiter

2018-10-08 Thread asfgit
Github user asfgit closed the pull request at:

https://github.com/apache/commons-lang/pull/369


---


[GitHub] commons-lang pull request #369: Update reflect tests to JUnit Jupiter

2018-10-07 Thread mureinik
GitHub user mureinik opened a pull request:

https://github.com/apache/commons-lang/pull/369

Update reflect tests to JUnit Jupiter

Upgrade the tests in the `reflect` 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, there are some non-obvious changes worth mentioning.

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.

Unlike `org.junit.Assume`, `org.junit.jupiter.api.Assumptions` does not 
have an `assumeNotNull` method. Instead, `assumeTrue` was used with an explicit 
condition of a variable being different than `null`.

It's also worth noting this is a minimal patch for migrating the package's 
tests to Jupiter. There are several tests that can be made more elegant with 
Jupiter's new features, but that work is left for
subsequent patches.

You can merge this pull request into a Git repository by running:

$ git pull https://github.com/mureinik/commons-lang junit-jupiter-reflect

Alternatively you can review and apply these changes as the patch at:

https://github.com/apache/commons-lang/pull/369.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 #369


commit cbc8e0b2952164f97779c9a5fadca6acd2600ae2
Author: Allon Mureinik 
Date:   2018-10-02T03:41:37Z

Update reflect tests to JUnit Jupiter

Upgrade the tests in the reflect 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, there are some non-obvious changes worth mentioning.

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.

Unlike org.junit.Assume, org.junit.jupiter.api.Assumptions does not have
an assumtNotNull method. Instead, assumeTrue was used with an explicit
condition of a variable being different than null.

It's also worth noting this is a minimal patch for migrating the
package's tests to Jupiter. There are several tests that can be made
more elegant with Jupiter's new features, but that work is left for
subsequent patches.




---