Containing

org.scalatest.enablers.Containing
See theContaining companion trait

Companion object for Containing that provides implicit implementations for the following types:

  • org.scalactic.ColCompatHelper.Iterable

  • String

  • Array

  • scala.Option

  • java.util.Collection

  • java.util.Map

Attributes

Companion
trait
Graph
Supertypes
class Object
trait Matchable
class Any
Show all
Self type
Containing.type

Members list

Implicits

Inherited implicits

implicit def containingNatureOfArray[E](implicit equality: Equality[E]): Containing[Array[E]]

Implicit to support Containing nature of Array.

Implicit to support Containing nature of Array.

Type parameters

E

the type of the element in the Array

Value parameters

equality

Equality type class that is used to check equality of element in the Array

Attributes

Returns

Containing[Array[E]] that supports Array in relevant contain syntax

Inherited from:
ContainingStandardImplicits
implicit def containingNatureOfEvery[E](implicit equality: Equality[E]): Containing[Every[E]]

Implicit to support Containing nature of Every.

Implicit to support Containing nature of Every.

Type parameters

E

the type of the element in the Every

Value parameters

equality

Equality type class that is used to check equality of element in the Every

Attributes

Returns

Containing[Every[E]] that supports Every in relevant contain syntax

Inherited from:
ContainingStandardImplicits
implicit def containingNatureOfIterable[E, ITR <: (Iterable)](implicit equality: Equality[E]): Containing[ITR[E]]

Implicit to support Containing nature of Iterable.

Implicit to support Containing nature of Iterable.

Type parameters

E

the type of the element in the Iterable

ITR

any subtype of Iterable

Value parameters

equality

Equality type class that is used to check equality of element in the Iterable

Attributes

Returns

Containing[TRAV[E]] that supports Iterable in relevant contain syntax

Inherited from:
ContainingStandardImplicits
implicit def containingNatureOfJavaCollection[E, JCOL <: (Collection)](implicit equality: Equality[E]): Containing[JCOL[E]]

Implicit to support Containing nature of java.util.Collection.

Implicit to support Containing nature of java.util.Collection.

Type parameters

E

the type of the element in the java.util.Collection

JCOL

any subtype of java.util.Collection

Value parameters

equality

Equality type class that is used to check equality of element in the java.util.Collection

Attributes

Returns

Containing[JCOL[E]] that supports java.util.Collection in relevant contain syntax

Inherited from:
JavaContainingImplicits
implicit def containingNatureOfJavaMap[K, V, JMAP <: (Map)](implicit equality: Equality[Entry[K, V]]): Containing[JMAP[K, V]]

Implicit to support Containing nature of java.util.Map.

Implicit to support Containing nature of java.util.Map.

Type parameters

JMAP

any subtype of java.util.Map

K

the type of the key in the java.util.Map

V

the type of the value in the java.util.Map

Value parameters

equality

Equality type class that is used to check equality of entry in the java.util.Map

Attributes

Returns

Containing[JMAP[K, V]] that supports java.util.Map in relevant contain syntax

Inherited from:
JavaContainingImplicits
implicit def containingNatureOfMap[K, V, MAP <: (Map)](implicit equality: Equality[(K, V)]): Containing[MAP[K, V]]

Implicit to support Containing nature of scala.collection.GenMap.

Implicit to support Containing nature of scala.collection.GenMap.

Type parameters

K

the type of the key in the scala.collection.GenMap

MAP

any subtype of scala.collection.GenMap

V

the type of the value in the scala.collection.GenMap

Value parameters

equality

Equality type class that is used to check equality of entry in the scala.collection.GenMap

Attributes

Returns

Containing[MAP[K, V]] that supports scala.collection.GenMap in relevant contain syntax

Inherited from:
ContainingHighPriorityImplicits
implicit def containingNatureOfOption[E, OPT <: (Option)](implicit equality: Equality[E]): Containing[OPT[E]]

Implicit to support Containing nature of scala.Option.

Implicit to support Containing nature of scala.Option.

Type parameters

E

the type of the element in the scala.Option

OPT

any subtype of scala.Option

Value parameters

equality

Equality type class that is used to check equality of element in the Option

Attributes

Returns

Containing[OPT[E]] that supports scala.Option in relevant contain syntax

Inherited from:
ContainingStandardImplicits
implicit def containingNatureOfString(implicit equality: Equality[Char]): Containing[String]

Implicit to support Containing nature of String.

Implicit to support Containing nature of String.

Value parameters

equality

Equality type class that is used to check equality of Char in the String

Attributes

Returns

Containing[String] that supports String in relevant contain syntax

Inherited from:
ContainingStandardImplicits
implicit def convertEqualityToArrayContaining[E](equality: Equality[E]): Containing[Array[E]]

Implicit conversion that converts an Equality of type E into Containing of type Array[E]. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type E into Containing of type Array[E]. This is required to support the explicit Equality syntax, for example:

(Array("hi") should contain oneOf ("HI")) (after being lowerCased)

(after being lowerCased) will returns an Equality[String] and this implicit conversion will convert it into Containing[Array[String]].

Type parameters

E

type of elements in the Array

Value parameters

equality

Equality of type E

Attributes

Returns

Containing of type Array[E]

Inherited from:
ContainingStandardImplicits
implicit def convertEqualityToEveryContaining[E](equality: Equality[E]): Containing[Every[E]]

Implicit conversion that converts an Equality of type E into Containing of type Every[E]. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type E into Containing of type Every[E]. This is required to support the explicit Equality syntax, for example:

(Every("hi", "he", "ho") should contain oneOf ("HI")) (after being lowerCased)

(after being lowerCased) will returns an Equality[String] and this implicit conversion will convert it into Containing[Every[String]].

Type parameters

E

type of elements in the Every

Value parameters

equality

Equality of type E

Attributes

Returns

Containing of type Every[E]

Inherited from:
ContainingStandardImplicits
implicit def convertEqualityToIterableContaining[E, ITR <: (Iterable)](equality: Equality[E]): Containing[ITR[E]]

Implicit conversion that converts an Equality of type E into Containing of type TRAV[E], where TRAV is a subtype of Iterable. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type E into Containing of type TRAV[E], where TRAV is a subtype of Iterable. This is required to support the explicit Equality syntax, for example:

(List("hi") should contain oneOf ("HI")) (after being lowerCased)

(after being lowerCased) will returns an Equality[String] and this implicit conversion will convert it into Containing[List[String]].

Type parameters

E

type of elements in the Iterable

ITR

subtype of Iterable

Value parameters

equality

Equality of type E

Attributes

Returns

Containing of type ITR[E]

Inherited from:
ContainingStandardImplicits
implicit def convertEqualityToJavaCollectionContaining[E, JCOL <: (Collection)](equality: Equality[E]): Containing[JCOL[E]]

Implicit conversion that converts an Equality of type E into Containing of type JCOL[E], where JCOL is a subtype of java.util.Collection. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type E into Containing of type JCOL[E], where JCOL is a subtype of java.util.Collection. This is required to support the explicit Equality syntax, for example:

val javaList = new java.util.ArrayList[String]()
javaList.add("hi")
(javaList should contain oneOf ("HI")) (after being lowerCased)

(after being lowerCased) will returns an Equality[String] and this implicit conversion will convert it into Containing[java.util.ArrayList[String]].

Type parameters

E

type of elements in the java.util.Collection

JCOL

subtype of java.util.Collection

Value parameters

equality

Equality of type E

Attributes

Returns

Containing of type JCOL[E]

Inherited from:
JavaContainingImplicits
implicit def convertEqualityToJavaMapContaining[K, V, JMAP <: (Map)](equality: Equality[Entry[K, V]]): Containing[JMAP[K, V]]

Implicit conversion that converts an Equality of type java.util.Map.Entry[K, V] into Containing of type JMAP[K, V], where JMAP is a subtype of java.util.Map. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type java.util.Map.Entry[K, V] into Containing of type JMAP[K, V], where JMAP is a subtype of java.util.Map. This is required to support the explicit Equality syntax, for example:

val javaMap = new java.util.HashMap[Int, String]()
javaMap.put(1, "one")
// lowerCased needs to be implemented as Normalization[java.util.Map.Entry[K, V]]
(javaMap should contain (Entry(1, "ONE"))) (after being lowerCased)

(after being lowerCased) will returns an java.util.Map.Entry[Int, String] and this implicit conversion will convert it into Containing[java.util.HashMap[Int, String]].

Type parameters

JMAP

any subtype of java.util.Map

K

the type of the key in the java.util.Map

V

the type of the value in the java.util.Map

Value parameters

equality

Equality of type java.util.Map.Entry[K, V]

Attributes

Returns

Containing of type JMAP[K, V]

Inherited from:
JavaContainingImplicits
implicit def convertEqualityToMapContaining[K, V, MAP <: (Map)](equality: Equality[(K, V)]): Containing[MAP[K, V]]

Implicit conversion that converts an Equality of type Tuple2[K, V] into Containing of type MAP[K, V], where MAP is a subtype of scala.collection.GenMap. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type Tuple2[K, V] into Containing of type MAP[K, V], where MAP is a subtype of scala.collection.GenMap. This is required to support the explicit Equality syntax, for example:

val map = Map(1 -> "one")
// lowerCased needs to be implemented as Normalization[Tuple2[K, V]]
(map should contain ((1, "ONE"))) (after being lowerCased)

(after being lowerCased) will returns an Tuple2[Int, String] and this implicit conversion will convert it into Containing[scala.collection.GenMap[Int, String]].

Type parameters

K

the type of the key in the scala.collection.GenMap

MAP

any subtype of scala.collection.GenMap

V

the type of the value in the scala.collection.GenMap

Value parameters

equality

Equality of type Tuple2[K, V]

Attributes

Returns

Containing of type MAP[K, V]

Inherited from:
ContainingHighPriorityImplicits
implicit def convertEqualityToOptionContaining[E, OPT <: (Option)](equality: Equality[E]): Containing[OPT[E]]

Implicit conversion that converts an Equality of type E into Containing of type OPT[E], where OPT is a subtype of scala.Option. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type E into Containing of type OPT[E], where OPT is a subtype of scala.Option. This is required to support the explicit Equality syntax, for example:

(Some("hi") should contain oneOf ("HI")) (after being lowerCased)

(after being lowerCased) will returns an Equality[String] and this implicit conversion will convert it into Containing[Some[String]].

Type parameters

E

type of elements in the scala.Option

OPT

subtype of scala.Option

Value parameters

equality

Equality of type E

Attributes

Returns

Containing of type OPT[E]

Inherited from:
ContainingStandardImplicits
implicit def convertEqualityToStringContaining(equality: Equality[Char]): Containing[String]

Implicit conversion that converts an Equality of type Char into Containing of type String. This is required to support the explicit Equality syntax, for example:

Implicit conversion that converts an Equality of type Char into Containing of type String. This is required to support the explicit Equality syntax, for example:

// lowerCased needs to be implemented as Normalization[Char]
("hi hello" should contain oneOf ('E')) (after being lowerCased)

(after being lowerCased) will returns an Equality[Char] and this implicit conversion will convert it into Containing[String].

Value parameters

equality

Equality of type Char

Attributes

Returns

Containing of type String

Inherited from:
ContainingStandardImplicits