Closed
Description
Evolution of Hamcrest and JUnit has been held back by the dependencies between the two projects. If they can be decoupled, both projects can move forward with less coordination required.
Plan:
- create a new project (hamcrest-junit, say) that contains a copy of the JUnit code that uses Hamcrest, repackaged somewhere under org.hamcrest (org.hamcrest.junit, say) so that they can live side-by-side with existing JUnit and Hamcrest code.
- Deprecate existing code in JUnit that depends on Hamcrest
- Perhaps deprecate Hamcrest's MatcherAssert class, now that it is duplicated in the hamcrest-junit module.
- Eventually delete the deprecated code.
- Run a CI "matrix" that reports the compatibility of Hamcrest and JUnit versions.
The uses of Hamcrest in JUnit are:
- Assert and Assume in org.junit, for which we'd have to duplicate the methods using matchers as (for instance) MatcherAssert and MatcherAssume
- ErrorCollector and ExpectedException (and a package-protected supporting class) in org.junit.rules, which we'd have to duplicate.
- several classes in the org.junit.internal packages, which client code should not be using