Skip to content

Commit

Permalink
fixed files form Mockito #6
Browse files Browse the repository at this point in the history
  • Loading branch information
tdurieux committed Mar 7, 2017
1 parent 6dd67ca commit 615be9f
Showing 1 changed file with 20 additions and 20 deletions.
40 changes: 20 additions & 20 deletions projects/Mockito/6/org/mockito/Matchers.java
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ public class Matchers {
* @return <code>false</code>.
*/
public static boolean anyBoolean() {
return reportMatcher(Any.ANY).returnFalse();
return reportMatcher(new InstanceOf(Boolean.class)).returnFalse();
}

/**
Expand All @@ -134,7 +134,7 @@ public static boolean anyBoolean() {
* @return <code>0</code>.
*/
public static byte anyByte() {
return reportMatcher(Any.ANY).returnZero();
return reportMatcher(new InstanceOf(Byte.class)).returnZero();
}

/**
Expand All @@ -149,7 +149,7 @@ public static byte anyByte() {
* @return <code>0</code>.
*/
public static char anyChar() {
return reportMatcher(Any.ANY).returnChar();
return reportMatcher(new InstanceOf(Character.class)).returnChar();
}

/**
Expand All @@ -164,7 +164,7 @@ public static char anyChar() {
* @return <code>0</code>.
*/
public static int anyInt() {
return reportMatcher(Any.ANY).returnZero();
return reportMatcher(new InstanceOf(Integer.class)).returnZero();
}

/**
Expand All @@ -179,7 +179,7 @@ public static int anyInt() {
* @return <code>0</code>.
*/
public static long anyLong() {
return reportMatcher(Any.ANY).returnZero();
return reportMatcher(new InstanceOf(Long.class)).returnZero();
}

/**
Expand All @@ -194,7 +194,7 @@ public static long anyLong() {
* @return <code>0</code>.
*/
public static float anyFloat() {
return reportMatcher(Any.ANY).returnZero();
return reportMatcher(new InstanceOf(Float.class)).returnZero();
}

/**
Expand All @@ -209,7 +209,7 @@ public static float anyFloat() {
* @return <code>0</code>.
*/
public static double anyDouble() {
return reportMatcher(Any.ANY).returnZero();
return reportMatcher(new InstanceOf(Double.class)).returnZero();
}

/**
Expand All @@ -224,7 +224,7 @@ public static double anyDouble() {
* @return <code>0</code>.
*/
public static short anyShort() {
return reportMatcher(Any.ANY).returnZero();
return reportMatcher(new InstanceOf(Short.class)).returnZero();
}

/**
Expand All @@ -241,7 +241,7 @@ public static short anyShort() {
* @return <code>null</code>.
*/
public static <T> T anyObject() {
return (T) reportMatcher(Any.ANY).returnNull();
return (T) reportMatcher(new InstanceOf(Object.class)).returnNull();
}

/**
Expand Down Expand Up @@ -289,7 +289,7 @@ public static <T> T anyVararg() {
* @return <code>null</code>.
*/
public static <T> T any(Class<T> clazz) {
return (T) reportMatcher(Any.ANY).returnFor(clazz);
return (T) reportMatcher(new InstanceOf(clazz)).returnFor(clazz);
}

/**
Expand All @@ -306,7 +306,7 @@ public static <T> T any(Class<T> clazz) {
* @return <code>null</code>.
*/
public static <T> T any() {
return (T) anyObject();
return (T) reportMatcher(Any.ANY).returnNull();
}

/**
Expand All @@ -321,7 +321,7 @@ public static <T> T any() {
* @return empty String ("")
*/
public static String anyString() {
return reportMatcher(Any.ANY).returnString();
return reportMatcher(new InstanceOf(String.class)).returnString();
}

/**
Expand All @@ -336,7 +336,7 @@ public static String anyString() {
* @return empty List.
*/
public static List anyList() {
return reportMatcher(Any.ANY).returnList();
return reportMatcher(new InstanceOf(List.class)).returnList();
}

/**
Expand All @@ -355,7 +355,7 @@ public static List anyList() {
* @return empty List.
*/
public static <T> List<T> anyListOf(Class<T> clazz) {
return (List) reportMatcher(Any.ANY).returnList();
return anyList();
}

/**
Expand All @@ -370,7 +370,7 @@ public static <T> List<T> anyListOf(Class<T> clazz) {
* @return empty Set
*/
public static Set anySet() {
return reportMatcher(Any.ANY).returnSet();
return reportMatcher(new InstanceOf(Set.class)).returnSet();
}

/**
Expand All @@ -389,7 +389,7 @@ public static Set anySet() {
* @return empty Set
*/
public static <T> Set<T> anySetOf(Class<T> clazz) {
return (Set) reportMatcher(Any.ANY).returnSet();
return anySet();
}

/**
Expand All @@ -404,7 +404,7 @@ public static <T> Set<T> anySetOf(Class<T> clazz) {
* @return empty Map.
*/
public static Map anyMap() {
return reportMatcher(Any.ANY).returnMap();
return reportMatcher(new InstanceOf(Map.class)).returnMap();
}

/**
Expand All @@ -424,7 +424,7 @@ public static Map anyMap() {
* @return empty Map.
*/
public static <K, V> Map<K, V> anyMapOf(Class<K> keyClazz, Class<V> valueClazz) {
return reportMatcher(Any.ANY).returnMap();
return anyMap();
}

/**
Expand All @@ -439,7 +439,7 @@ public static <K, V> Map<K, V> anyMapOf(Class<K> keyClazz, Class<V> valueClazz)
* @return empty Collection.
*/
public static Collection anyCollection() {
return reportMatcher(Any.ANY).returnList();
return reportMatcher(new InstanceOf(Collection.class)).returnList();
}

/**
Expand All @@ -458,7 +458,7 @@ public static Collection anyCollection() {
* @return empty Collection.
*/
public static <T> Collection<T> anyCollectionOf(Class<T> clazz) {
return (Collection) reportMatcher(Any.ANY).returnList();
return anyCollection();
}

/**
Expand Down

0 comments on commit 615be9f

Please sign in to comment.