public final class EasyMockMatcherUtils extends Object
EasyMock
matchers.Modifier and Type | Method and Description |
---|---|
static <T> T |
any(Class<T> argumentType)
Typed 'any' matcher.
|
static <E> Collection<E> |
anyCollection(Class<E> elementType)
Typed 'any collection' matcher.
|
static <E> List<E> |
anyList(Class<E> elementType)
Typed 'any list' matcher.
|
static <K,V> Map<K,V> |
anyMap(Class<K> keyType,
Class<V> valueType)
Typed 'any map' matcher.
|
static String |
anyString()
Shortcut for
any(Class) called with String class. |
static <K,V> Map<K,V> |
mapContaining(K key,
V value)
Matcher for a map containing given key and value.
|
static <K,V> Map<K,V> |
mapContaining(K key1,
V value1,
K key2,
V value2)
Matcher for a map containing at least two entries specified by given keys and values
|
static <T> T |
nullArg(Class<T> argumentType)
Typed 'is null' matcher.
|
public static <T> T nullArg(Class<T> argumentType)
T
- type of the matched argumentargumentType
- class representing argument's typepublic static <T> T any(Class<T> argumentType)
EasyMock.isA(Class)
in that it does not check type of the actual
argument.T
- type of the matched argumentargumentType
- class representing argument's typepublic static String anyString()
any(Class)
called with String class.any(Class)
public static <K,V> Map<K,V> anyMap(Class<K> keyType, Class<V> valueType)
EasyMock.isA(Class)
} with a Map parameter,
but avoids type-safety warnings in the calling methods.K
- type of the map keyV
- type of the map valuekeyType
- class representing the type of map keysvalueType
- class representing the type of map valuespublic static <E> List<E> anyList(Class<E> elementType)
EasyMock.isA(Class)
with a List parameter,
but avoids type-safety warnings in the calling methods.E
- type of the list elementelementType
- class representing the type of list elementspublic static <E> Collection<E> anyCollection(Class<E> elementType)
EasyMock.isA(Class)
, with a Collection parameter, but
avoids type-safety warnings in the calling methods.E
- type of the collection elementelementType
- class representing the type of list elementspublic static <K,V> Map<K,V> mapContaining(K key, V value)
K
- type of keyV
- type of valuekey
- keyvalue
- valuepublic static <K,V> Map<K,V> mapContaining(K key1, V value1, K key2, V value2)
K
- type of keyV
- type of valuekey1
- first keyvalue1
- first valuekey2
- second keyvalue2
- second valueCopyright © 2002-2015 Atlassian. All Rights Reserved.