You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by mureinik <gi...@git.apache.org> on 2018/10/09 16:41:20 UTC
[GitHub] commons-lang pull request #373: Update mutable tests to JUnit Jupiter
GitHub user mureinik opened a pull request:
https://github.com/apache/commons-lang/pull/373
Update mutable tests to JUnit Jupiter
Upgrade the tests in the `mutable` 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.Assert.assertEquals(double, double, double)`, `org.junit.jupiter.api.Assertions.assertEquals(double, double, double)` does not support deltas of zero, only strictly positive deltas.
This issue will be addressed in JUnit Jupiter 5.4 (see https://github.com/junit-team/junit5/pull/1613 for details). In the meanwhile, `assertTrue(expected==actual)` was used, and `TODO` comments were placed in the code to refactor it to assertEquals once JUnit 5.4 is available.
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-mutable
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/commons-lang/pull/373.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 #373
----
commit 94beded83960af2a15992f6cec8f1f59d1f3c051
Author: Allon Mureinik <mu...@...>
Date: 2018-10-02T03:41:37Z
Update mutable tests to JUnit Jupiter
Upgrade the tests in the mutable 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.Assert.assertEquals(double, double, double),
org.junit.jupiter.api.Assertions.assertEquals(double, double, double)
does not support deltas of zero, only strictly positive deltas.
This issue will be addressed in JUnit Jupiter 5.4 (see
https://github.com/junit-team/junit5/pull/1613 for details). In the
meanwhile, assertTrue(expected==actual) was used, and TODO comments were
placed in the code to refactor it to assertEquals once JUnit 5.4 is
available.
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.
----
---
[GitHub] commons-lang issue #373: Update mutable tests to JUnit Jupiter
Posted by PascalSchumacher <gi...@git.apache.org>.
Github user PascalSchumacher commented on the issue:
https://github.com/apache/commons-lang/pull/373
Thanks! 👍
---
[GitHub] commons-lang pull request #373: Update mutable tests to JUnit Jupiter
Posted by asfgit <gi...@git.apache.org>.
Github user asfgit closed the pull request at:
https://github.com/apache/commons-lang/pull/373
---
[GitHub] commons-lang issue #373: Update mutable tests to JUnit Jupiter
Posted by coveralls <gi...@git.apache.org>.
Github user coveralls commented on the issue:
https://github.com/apache/commons-lang/pull/373
[![Coverage Status](https://coveralls.io/builds/19428801/badge)](https://coveralls.io/builds/19428801)
Coverage remained the same at 95.253% when pulling **94beded83960af2a15992f6cec8f1f59d1f3c051 on mureinik:junit-jupiter-mutable** into **47a9ea7c828772625b9e26c0c7a6db494ea626a3 on apache:master**.
---