You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
JUnit 4.13 is going to deprecate all APIs that use Hamcrest. This includes methods of both ErrorCollector and ExpectedException. Instead JUnit 5.0 will change the internal implementation to not use Hamcrest.
I'm looking for a way for Hamcrest to be able to extend both rules, e.g. add a expect(Matcher<? super Throwable>) method to ExpectedException or checkThat(T value, Matcher<? super T> matcher). Right now, all I can think of is hamcrest-junit providing subclasses for both rules or JUnit adding a functional interface, e.g. interface Check<T>{ void check(T value) throws AssertionError; }, instead of using Matcher<T> and hamcrest-junit adding an adapter, e.g. MatcherCheck<T> extends Check<T>.
JUnit 4.13 is going to deprecate all APIs that use Hamcrest. This includes methods of both
ErrorCollector
andExpectedException
. Instead JUnit 5.0 will change the internal implementation to not use Hamcrest.I'm looking for a way for Hamcrest to be able to extend both rules, e.g. add a
expect(Matcher<? super Throwable>)
method toExpectedException
orcheckThat(T value, Matcher<? super T> matcher)
. Right now, all I can think of is hamcrest-junit providing subclasses for both rules or JUnit adding a functional interface, e.g.interface Check<T>{ void check(T value) throws AssertionError; }
, instead of usingMatcher<T>
and hamcrest-junit adding an adapter, e.g.MatcherCheck<T> extends Check<T>
.Some of this has already been discussed over at junit-team/junit4#1150
@npryce @sf105 I'm looking for your opinion on this.
The text was updated successfully, but these errors were encountered: