final class ContainWord extends AnyRef
This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
the matchers DSL.
- Source
- ContainWord.scala
- Alphabetic
- By Inheritance
- ContainWord
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new ContainWord()
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def allElementsOf(elements: GenTraversable[Any]): MatcherFactory1[Any, Aggregating]
- def allOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit prettifier: Prettifier, pos: Position): MatcherFactory1[Any, Aggregating]
- def apply(expectedElement: Any): MatcherFactory1[Any, Containing]
This method enables the following syntax:
This method enables the following syntax:
Array(1, 2) should (contain (2) and contain (1)) ^
- def apply(nullValue: Null): MatcherFactory1[Any, Containing]
This method enables the following syntax:
This method enables the following syntax:
list should contain (null) ^
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def atLeastOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[Any, Aggregating]
- def atLeastOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit prettifier: Prettifier, pos: Position): MatcherFactory1[Any, Aggregating]
- def atMostOneElementOf(elements: GenTraversable[Any]): MatcherFactory1[Any, Aggregating]
- def atMostOneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit prettifier: Prettifier, pos: Position): MatcherFactory1[Any, Aggregating]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable])
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def inOrder(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit prettifier: Prettifier, pos: Position): MatcherFactory1[Any, Sequencing]
- def inOrderElementsOf(elements: GenTraversable[Any]): MatcherFactory1[Any, Sequencing]
- def inOrderOnly(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit prettifier: Prettifier, pos: Position): MatcherFactory1[Any, Sequencing]
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- def key[K](expectedKey: Any): MatcherFactory1[Any, KeyMapping]
This method enables the following syntax:
This method enables the following syntax:
map should (contain key ("fifty five") or contain key ("twenty two")) ^
The map's value type parameter cannot be inferred because only a key type is provided in an expression like
(contain key ("fifty five"))
. The matcher returned by this method matchesscala.collection.Map
s with the inferred key type and value typeAny
. GivenMap
is covariant in its value type, andMatcher
is contravariant in its type parameter, aMatcher[Map[Int, Any]]
, for example, is a subtype ofMatcher[Map[Int, String]]
. This will enable the matcher returned by this method to be used against anyMap
that has the inferred key type. - final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def noElementsOf(elements: GenTraversable[Any]): MatcherFactory1[Any, Containing]
- def noneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit prettifier: Prettifier, pos: Position): MatcherFactory1[Any, Containing]
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- def oneElementOf(elements: GenTraversable[Any]): MatcherFactory1[Any, Containing]
- def oneOf(firstEle: Any, secondEle: Any, remainingEles: Any*)(implicit prettifier: Prettifier, pos: Position): MatcherFactory1[Any, Containing]
- def only(right: Any*)(implicit prettifier: Prettifier, pos: Position): MatcherFactory1[Any, Aggregating]
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def theSameElementsAs(right: GenTraversable[Any]): MatcherFactory1[Any, Aggregating]
- def theSameElementsInOrderAs(right: GenTraversable[Any]): MatcherFactory1[Any, Sequencing]
- def toString(): String
Overrides toString to return "contain"
Overrides toString to return "contain"
- Definition Classes
- ContainWord → AnyRef → Any
- def value[K](expectedValue: Any): MatcherFactory1[Any, ValueMapping]
This method enables the following syntax:
This method enables the following syntax:
Map("one" -> 1, "two" -> 2) should (not contain value (5) and not contain value (3)) ^
The map's key type parameter cannot be inferred because only a value type is provided in an expression like
(contain value (5))
. The matcher returned by this method matchesscala.collection.Map
s with the inferred value type and the existential key type[K] forSome { type K }
. Even thoughMatcher
is contravariant in its type parameter, becauseMap
is nonvariant in its key type, aMatcher[Map[Any, Int]]
, for example, is not a subtype ofMatcher[Map[String, Int]]
, so the key type parameter of theMap
returned by this method cannot beAny
. By making it an existential type, the Scala compiler will not infer it to anything more specific. This will enable the matcher returned by this method to be used against anyMap
that has the inferred value type. - final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()