com.atlassian.jira.matchers
Class MapMatchers

java.lang.Object
  extended by com.atlassian.jira.matchers.MapMatchers

public final class MapMatchers
extends Object

Matchers for Maps.

Since:
v5.2

Method Summary
static
<K,V> org.hamcrest.Matcher<Map<K,V>>
isMapOf(K key1, V value1, K key2, V value2)
          Guava factory style map matcher for a map containing exactly 2 entries matching the arguments.
static
<K,V> org.hamcrest.Matcher<Map<K,V>>
isSingletonMap(K expectedKey, V expectedValue)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

isSingletonMap

public static <K,V> org.hamcrest.Matcher<Map<K,V>> isSingletonMap(K expectedKey,
                                                                  V expectedValue)

isMapOf

public static <K,V> org.hamcrest.Matcher<Map<K,V>> isMapOf(K key1,
                                                           V value1,
                                                           K key2,
                                                           V value2)
Guava factory style map matcher for a map containing exactly 2 entries matching the arguments.

Type Parameters:
K - key type
V - value type
Parameters:
key1 - key of the first entry
value1 - value of the first entry
key2 - key of the second entry
value2 - key of the second entry
Returns:
matcher for the map equal to a map of provided keys and values


Copyright © 2002-2014 Atlassian. All Rights Reserved.