MapMatchers

org.specs2.matcher.MapMatchers
See theMapMatchers companion object
trait MapMatchers

Matchers for Maps

Attributes

Companion
object
Graph
Supertypes
class Object
trait Matchable
class Any
Known subtypes
object MapMatchers.type
trait Matchers
object Matchers.type
trait MustMatchers
object MustMatchers.type
object MustThrownMatchers.type
object ShouldMatchers.type
object ShouldThrownMatchers.type
Show all

Members list

Value members

Concrete methods

def beDefinedAt[K](values: K*): Matcher[PartialFunction[K, Any]]

matches if the partial function is defined at those values

matches if the partial function is defined at those values

Attributes

def beDefinedBy[K, V](values: (K, V)*): Matcher[PartialFunction[K, V]]

matches if the partial function is defined at those values and return expected values

matches if the partial function is defined at those values and return expected values

Attributes

def haveKey[K](k: K): Matcher[Iterable[(K, Any)]]

matches if map.contains(k)

matches if map.contains(k)

Attributes

def haveKeys[K](keys: K*): Matcher[Iterable[(K, Any)]]

matches if map.contains(k) forall key k

matches if map.contains(k) forall key k

Attributes

def havePair[K, V](p: (K, V)): Matcher[Iterable[(K, V)]]

matches if map contains a pair (key, value) == (k, v)

matches if map contains a pair (key, value) == (k, v)

Attributes

def havePairs[K, V](pairs: (K, V)*): Matcher[Iterable[(K, V)]]

matches if map contains all the specified pairs

matches if map contains all the specified pairs

Attributes

def haveValue[V](v: V): Matcher[Iterable[(Any, V)]]

matches if map contains a pair (key, value) with value == v

matches if map contains a pair (key, value) with value == v

Attributes

def haveValues[V](values: V*): Matcher[Iterable[(Any, V)]]

matches if map contains a pair (key, value) with value == v for all value v

matches if map contains a pair (key, value) with value == v for all value v

Attributes