sealed class AnyMustWrapper[T] extends AnyRef
This class is part of the ScalaTest matchers DSL. Please see the documentation for Matchers
for an overview of
the matchers DSL.
This class is used in conjunction with an implicit conversion to enable must
methods to
be invoked on objects of type Any
.
- Source
- Matchers.scala
- Alphabetic
- By Inheritance
- AnyMustWrapper
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AnyMustWrapper(leftSideValue: T, pos: Position, prettifier: Prettifier)
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
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- 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()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- val leftSideValue: T
- def must(endWithWord: EndWithWord)(implicit ev: <:<[T, String]): ResultOfEndWithWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string must endWith regex ("world") ^
- def must(startWithWord: StartWithWord)(implicit ev: <:<[T, String]): ResultOfStartWithWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string must startWith regex ("hello") ^
- def must(includeWord: IncludeWord)(implicit ev: <:<[T, String]): ResultOfIncludeWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string must include regex ("hi") ^
- def must(notExist: ResultOfNotExist)(implicit existence: Existence[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
file must not (exist) ^
- def must(existWord: ExistWord)(implicit existence: Existence[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
file must exist ^
- def must(containWord: ContainWord): ResultOfContainWord[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
xs must contain oneOf (1, 2, 3) ^
- def must(haveWord: HaveWord): ResultOfHaveWordForExtent[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result must have length (3) ^ result must have size (3) ^
- def must(beWord: BeWord): ResultOfBeWordForAny[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result must be a aMatcher ^
- def must(inv: TripleEqualsInvocationOnSpread[T])(implicit ev: Numeric[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result must === (100 +- 1) ^
- def must[U](inv: TripleEqualsInvocation[U])(implicit constraint: CanEqual[T, U]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
a must === (b) ^
- def must(notWord: NotWord): ResultOfNotWordForAny[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result must not equal (3) ^
- def must[TYPECLASS1[_], TYPECLASS2[_]](rightMatcherFactory2: MatcherFactory2[T, TYPECLASS1, TYPECLASS2])(implicit typeClass1: TYPECLASS1[T], typeClass2: TYPECLASS2[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result must (equal (expected) and have length 3) ^
- def must[TYPECLASS1[_]](rightMatcherFactory1: MatcherFactory1[T, TYPECLASS1])(implicit typeClass1: TYPECLASS1[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result must equal (3) ^
- def must(rightMatcherX1: Matcher[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result must be (3) ^
- def mustBe[U >: T](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U])(implicit ev: <:<[T, AnyRef]): Assertion
This method enables the following syntax, where
excellentRead
refers to aBePropertyMatcher[Book]
:This method enables the following syntax, where
excellentRead
refers to aBePropertyMatcher[Book]
:programmingInScala mustBe an (excellentRead) ^
- def mustBe[U >: T](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U])(implicit ev: <:<[T, AnyRef]): Assertion
This method enables the following syntax, where
goodRead
refers to aBePropertyMatcher[Book]
:This method enables the following syntax, where
goodRead
refers to aBePropertyMatcher[Book]
:programmingInScala mustBe a (goodRead) ^
- def mustBe(bePropertyMatcher: BePropertyMatcher[T])(implicit ev: <:<[T, AnyRef]): Assertion
This method enables the following syntax, where
excellentRead
refers to aBePropertyMatcher[Book]
:This method enables the following syntax, where
excellentRead
refers to aBePropertyMatcher[Book]
:programmingInScala mustBe excellentRead ^
- def mustBe(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication)(implicit toAnyRef: <:<[T, AnyRef]): Assertion
This method enables the following syntax:
This method enables the following syntax:
list mustBe an ('empty) ^
- def mustBe(resultOfAWordApplication: ResultOfAWordToSymbolApplication)(implicit toAnyRef: <:<[T, AnyRef]): Assertion
This method enables the following syntax:
This method enables the following syntax:
list mustBe a ('empty) ^
- def mustBe(symbol: Symbol)(implicit toAnyRef: <:<[T, AnyRef]): Assertion
This method enables the following syntax:
This method enables the following syntax:
list mustBe 'empty ^
- def mustBe(resultOfSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication)(implicit toAnyRef: <:<[T, AnyRef]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustBe theSameInstanceAs (anotherObject) ^
- def mustBe(right: Null)(implicit ev: <:<[T, AnyRef]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustBe null ^
- def mustBe(right: DefinedWord)(implicit definition: Definition[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustBe defined ^
- def mustBe(right: EmptyWord)(implicit emptiness: Emptiness[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustBe empty ^
- def mustBe(right: WritableWord)(implicit writability: Writability[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustBe writable ^
- def mustBe(right: ReadableWord)(implicit readability: Readability[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustBe readable ^
- macro def mustBe(anType: ResultOfAnTypeInvocation[_]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
aDouble mustBe an [Book] ^
- macro def mustBe(aType: ResultOfATypeInvocation[_]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
aDouble mustBe a [Book] ^
- def mustBe(right: SortedWord)(implicit sortable: Sortable[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustBe sorted ^
- def mustBe(spread: Spread[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustBe 7.1 +- 0.2 ^
- def mustBe(beMatcher: BeMatcher[T]): Assertion
This method enables the following syntax, where
odd
refers to aBeMatcher[Int]
:This method enables the following syntax, where
odd
refers to aBeMatcher[Int]
:testing 1 mustBe odd ^
- def mustBe(comparison: ResultOfGreaterThanOrEqualToComparison[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
8 mustBe >= (7) ^
- def mustBe(comparison: ResultOfLessThanOrEqualToComparison[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
5 mustBe <= (7) ^
- def mustBe(comparison: ResultOfGreaterThanComparison[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
8 mustBe > (7) ^
- def mustBe(comparison: ResultOfLessThanComparison[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
5 mustBe < (7) ^
- def mustBe(right: Any): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
aDouble mustBe 8.8 ^
- def mustEqual(right: Null)(implicit ev: <:<[T, AnyRef]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustEqual null ^
- def mustEqual(spread: Spread[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustEqual 7.1 +- 0.2 ^
- def mustEqual(right: Any)(implicit equality: Equality[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
a mustEqual b ^
- def mustNot(includeWord: IncludeWord)(implicit ev: <:<[T, String]): ResultOfIncludeWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string mustNot include regex ("hi") ^
- def mustNot(endWithWord: EndWithWord)(implicit ev: <:<[T, String]): ResultOfEndWithWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string mustNot endWith regex ("world") ^
- def mustNot(startWithWord: StartWithWord)(implicit ev: <:<[T, String]): ResultOfStartWithWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string mustNot startWith regex ("hello") ^
- def mustNot(existWord: ExistWord)(implicit existence: Existence[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
file mustNot exist ^
- def mustNot(contain: ContainWord): ResultOfContainWord[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
xs mustNot contain (oneOf (1, 2, 3)) ^
- def mustNot(haveWord: HaveWord): ResultOfHaveWordForExtent[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustNot have length (3) ^ result mustNot have size (3) ^ exception mustNot have message ("file not found") ^
- def mustNot[TYPECLASS1[_]](rightMatcherFactory1: MatcherFactory1[T, TYPECLASS1])(implicit typeClass1: TYPECLASS1[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustNot (be readable) ^
- def mustNot(rightMatcherX1: Matcher[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustNot (be (3)) ^
- def mustNot(beWord: BeWord): ResultOfBeWordForAny[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result mustNot be (3) ^
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
- val pos: Position
- val prettifier: Prettifier
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- 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()