Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate MockitoHamcrest #1819

Merged
merged 1 commit into from Nov 18, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
21 changes: 21 additions & 0 deletions src/main/java/org/mockito/hamcrest/MockitoHamcrest.java
Expand Up @@ -44,7 +44,10 @@
* If you have an idea how to fix the problem, let us know via the mailing list or the issue tracker.
*
* @since 2.1.0
*
* @deprecated Use the regular {@link org.mockito.ArgumentMatchers#argThat(ArgumentMatcher)} instead
*/
@Deprecated
public class MockitoHamcrest {

/**
Expand All @@ -55,7 +58,9 @@ public class MockitoHamcrest {
* @param matcher decides whether argument matches
* @return <code>null</code> or default value for primitive (0, false, etc.)
* @since 2.1.0
* @deprecated Use {@link org.mockito.ArgumentMatchers#argThat(ArgumentMatcher)} instead
*/
@Deprecated
@SuppressWarnings("unchecked")
public static <T> T argThat(Matcher<T> matcher) {
reportMatcher(matcher);
Expand All @@ -70,7 +75,9 @@ public static <T> T argThat(Matcher<T> matcher) {
*
* @param matcher decides whether argument matches
* @return <code>0</code>.
* @deprecated Use {@link org.mockito.ArgumentMatchers#charThat(ArgumentMatcher)} instead
*/
@Deprecated
public static char charThat(Matcher<Character> matcher) {
reportMatcher(matcher);
return 0;
Expand All @@ -84,7 +91,9 @@ public static char charThat(Matcher<Character> matcher) {
*
* @param matcher decides whether argument matches
* @return <code>false</code>.
* @deprecated Use {@link org.mockito.ArgumentMatchers#booleanThat(ArgumentMatcher)} instead
*/
@Deprecated
public static boolean booleanThat(Matcher<Boolean> matcher) {
reportMatcher(matcher);
return false;
Expand All @@ -98,7 +107,9 @@ public static boolean booleanThat(Matcher<Boolean> matcher) {
*
* @param matcher decides whether argument matches
* @return <code>0</code>.
* @deprecated Use {@link org.mockito.ArgumentMatchers#byteThat(ArgumentMatcher)} instead
*/
@Deprecated
public static byte byteThat(Matcher<Byte> matcher) {
reportMatcher(matcher);
return 0;
Expand All @@ -112,7 +123,9 @@ public static byte byteThat(Matcher<Byte> matcher) {
*
* @param matcher decides whether argument matches
* @return <code>0</code>.
* @deprecated Use {@link org.mockito.ArgumentMatchers#shortThat(ArgumentMatcher)} instead
*/
@Deprecated
public static short shortThat(Matcher<Short> matcher) {
reportMatcher(matcher);
return 0;
Expand All @@ -126,7 +139,9 @@ public static short shortThat(Matcher<Short> matcher) {
*
* @param matcher decides whether argument matches
* @return <code>0</code>.
* @deprecated Use {@link org.mockito.ArgumentMatchers#intThat(ArgumentMatcher)} instead
*/
@Deprecated
public static int intThat(Matcher<Integer> matcher) {
reportMatcher(matcher);
return 0;
Expand All @@ -140,7 +155,9 @@ public static int intThat(Matcher<Integer> matcher) {
*
* @param matcher decides whether argument matches
* @return <code>0</code>.
* @deprecated Use {@link org.mockito.ArgumentMatchers#longThat(ArgumentMatcher)} instead
*/
@Deprecated
public static long longThat(Matcher<Long> matcher) {
reportMatcher(matcher);
return 0;
Expand All @@ -154,7 +171,9 @@ public static long longThat(Matcher<Long> matcher) {
*
* @param matcher decides whether argument matches
* @return <code>0</code>.
* @deprecated Use {@link org.mockito.ArgumentMatchers#floatThat(ArgumentMatcher)} instead
*/
@Deprecated
public static float floatThat(Matcher<Float> matcher) {
reportMatcher(matcher);
return 0;
Expand All @@ -168,7 +187,9 @@ public static float floatThat(Matcher<Float> matcher) {
*
* @param matcher decides whether argument matches
* @return <code>0</code>.
* @deprecated Use {@link org.mockito.ArgumentMatchers#doubleThat(ArgumentMatcher)} instead
*/
@Deprecated
public static double doubleThat(Matcher<Double> matcher) {
reportMatcher(matcher);
return 0;
Expand Down