trait ValueMapping[-M] extends AnyRef
Supertrait for typeclasses that enable contain value
matcher syntax.
A ValueMapping[M]
provides access to the "value mapping nature" of type M
in such
a way that contain
value
matcher syntax can be used with type M
. An M
can be any type for which contain
value
syntax makes sense. ScalaTest provides implicit implementations
for scala.collection.GenMap
and java.util.Map
. You can enable the contain
value
matcher syntax on your own type U
by defining a ValueMapping[U]
for the type and making it
available implicitly.
ScalaTest provides implicit ValueMapping
instances for scala.collection.GenMap
,
and java.util.Map
in the ValueMapping
companion object.
- Source
- ValueMapping.scala
- Alphabetic
- By Inheritance
- ValueMapping
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Abstract Value Members
-
abstract
def
containsValue(map: M, value: Any): Boolean
Check if the passed
map
contains the passedvalue
.Check if the passed
map
contains the passedvalue
.- map
a map about which an assertion is being made
- value
value of which should be contained in the passed map
- returns
true if the passed map contains the passed value