Trait/Object

org.scalatest.enablers

KeyMapping

Related Docs: object KeyMapping | package enablers

Permalink

trait KeyMapping[-M] extends AnyRef

Supertrait for typeclasses that enable contain key matcher syntax.

A KeyMapping[M] provides access to the "key mapping nature" of type M in such a way that contain key matcher syntax can be used with type M. A M can be any type for which contain key syntax makes sense. ScalaTest provides implicit implementations for scala.collection.GenMap and java.util.Map. You can enable the contain key matcher syntax on your own type U by defining a KeyMapping[U] for the type and making it available implicitly.

ScalaTest provides implicit KeyMapping instances for scala.collection.GenMap, and java.util.Map in the KeyMapping companion object.

Source
KeyMapping.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. KeyMapping
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

  1. abstract def containsKey(map: M, key: Any): Boolean

    Permalink

    Check if the passed map contains the passed key.

    Check if the passed map contains the passed key.

    map

    a map about which an assertion is being made

    key

    key of which should be contained in the passed map

    returns

    true if the passed map contains the passed key