|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.atlassian.jira.easymock.EasyMockMatcherUtils
public final class EasyMockMatcherUtils
Static utilities for easier creation of EasyMock
matchers.
| Method Summary | ||
|---|---|---|
static
|
any(Class<T> argumentType)
Typed 'any' matcher. |
|
static
|
anyCollection(Class<E> elementType)
Typed 'any collection' matcher. |
|
static
|
anyList(Class<E> elementType)
Typed 'any list' matcher. |
|
static
|
anyMap(Class<K> keyType,
Class<V> valueType)
Typed 'any map' matcher. |
|
static String |
anyString()
Shortcut for any(Class) called with String class. |
|
static
|
mapContaining(K key,
V value)
Matcher for a map containing given key and value. |
|
static
|
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
|
nullArg(Class<T> argumentType)
Typed 'is null' matcher. |
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static <T> T nullArg(Class<T> argumentType)
T - type of the matched argumentargumentType - class representing argument's type
public 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 type
public 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 values
public 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 elements
public 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 elements
public static <K,V> Map<K,V> mapContaining(K key,
V value)
K - type of keyV - type of valuekey - keyvalue - value
public 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 value
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||