[GitHub] commons-lang pull request #374: Update time tests to JUnit Jupiter

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

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


---


[GitHub] commons-lang pull request #374: Update time tests to JUnit Jupiter

2018-10-10 Thread mureinik
Github user mureinik commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/374#discussion_r224144394
  
--- Diff: pom.xml ---
@@ -543,6 +543,11 @@
   junit-vintage-engine
   test
 
+
+  org.junit-pioneer
+  junit-pioneer
+  0.2.0
--- End diff --

Good catch, thanks.


---


[GitHub] commons-lang pull request #374: Update time tests to JUnit Jupiter

2018-10-10 Thread PascalSchumacher
Github user PascalSchumacher commented on a diff in the pull request:

https://github.com/apache/commons-lang/pull/374#discussion_r224137193
  
--- Diff: pom.xml ---
@@ -543,6 +543,11 @@
   junit-vintage-engine
   test
 
+
+  org.junit-pioneer
+  junit-pioneer
+  0.2.0
--- End diff --

This dependency should have `test` scope.


---


[GitHub] commons-lang pull request #374: Update time tests to JUnit Jupiter

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

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

Update time tests to JUnit Jupiter

Upgrade the tests in the `time` 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.

JUnit Jupiter no longer has a concept of runners. Tests previously run with 
the `org.junit.runners.Parameterized` runner were rewritten to use 
`@ParameterizedTest` and a `@MethodSource`.

JUnit Jupiter also no longer has the concept of Rules. Usages of the 
`SystemDefaultsSwitch` rule and its accompanying annotates were replaced with 
the `@DefaultLocale` and `@DefaultTimezone` annotations that @britter 
contributed to [JUnit Pioneer](https://github.com/junit-pioneer/junit-pioneer), 
the semi-official JUnit extension project.

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-time

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

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


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

Update time tests to JUnit Jupiter

Upgrade the tests in the time 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.

JUnit Jupiter no longer has a concept of runners. Tests previously run
with the org.junit.runners.Parameterized runner were rewritten to use
@ParameterizedTest and a @MethodSource.

JUnit Jupiter also no longer has the concept of Rules. Usages of the
SystemDefaultsSwitch rule and its accompanying annotates were replaced
with the @DefaultLocale and @DefaultTimezone annotations that
Benedikt Ritter contributed to JUnit Pioneer, the semi-official JUnit
extension project.

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.




---