LoneElementMapWrapper
org.scalatest.LoneElement.LoneElementMapWrapper
final class LoneElementMapWrapper[K, V, MAP <: (Map)](map: MAP[K, V], collecting: Collecting[(K, V), Iterable[(K, V)]], prettifier: Prettifier, pos: Position)
Wrapper class that adds a loneElement method to Map for which an implicit Collecting[(K, V), org.scalactic.ColCompatHelper.Iterable[(K, V)]] is available.
Through the implicit conversion provided by trait LoneElement, this class allows you to make statements like:
map.loneElement._1 should be > 9
Type parameters
- K
-
the element type of the Map key on which to add the
loneElementmethod - MAP
-
the "Map type constructor" for the collection on which to add the
loneElementmethod - V
-
the element type of the Map value on which to add the
loneElementmethod
Value parameters
- collecting
-
a typeclass that enables the
loneElementsyntax
Attributes
- Graph
-
- Supertypes
-
class Objecttrait Matchableclass Any
Members list
In this article