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

----


---

Reply via email to