sealed class AnyShouldWrapper[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 should
methods to
be invoked on objects of type Any
.
- Source
- Matchers.scala
- Alphabetic
- By Inheritance
- AnyShouldWrapper
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new AnyShouldWrapper(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
- 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
- def should(endWithWord: EndWithWord)(implicit ev: <:<[T, String]): ResultOfEndWithWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string should endWith regex ("world") ^
- def should(startWithWord: StartWithWord)(implicit ev: <:<[T, String]): ResultOfStartWithWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string should startWith regex ("hello") ^
- def should(includeWord: IncludeWord)(implicit ev: <:<[T, String]): ResultOfIncludeWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string should include regex ("hi") ^
- def should(notExist: ResultOfNotExist)(implicit existence: Existence[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
file should not (exist) ^
- def should(existWord: ExistWord)(implicit existence: Existence[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
file should exist ^
- def should(containWord: ContainWord): ResultOfContainWord[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
xs should contain oneOf (1, 2, 3) ^
- def should(haveWord: HaveWord): ResultOfHaveWordForExtent[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result should have length (3) ^ result should have size (3) ^
- def should(beWord: BeWord): ResultOfBeWordForAny[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result should be a aMatcher ^
- def should(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 should === (100 +- 1) ^
- def should[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 should === (b) ^
- def should(notWord: NotWord): ResultOfNotWordForAny[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result should not equal (3) ^
- def should[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 should (equal (expected) and have length 3) ^
- def should[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 should equal (3) ^
- def should(rightMatcherX1: Matcher[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result should be (3) ^
- def shouldBe[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 shouldBe an (excellentRead) ^
- def shouldBe[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 shouldBe a (goodRead) ^
- def shouldBe(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 shouldBe excellentRead ^
- def shouldBe(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication)(implicit toAnyRef: <:<[T, AnyRef]): Assertion
This method enables the following syntax:
This method enables the following syntax:
list shouldBe an ('empty) ^
- def shouldBe(resultOfAWordApplication: ResultOfAWordToSymbolApplication)(implicit toAnyRef: <:<[T, AnyRef]): Assertion
This method enables the following syntax:
This method enables the following syntax:
list shouldBe a ('empty) ^
- def shouldBe(symbol: Symbol)(implicit toAnyRef: <:<[T, AnyRef]): Assertion
This method enables the following syntax:
This method enables the following syntax:
list shouldBe 'empty ^
- def shouldBe(resultOfSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication)(implicit toAnyRef: <:<[T, AnyRef]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldBe theSameInstanceAs (anotherObject) ^
- def shouldBe(right: Null)(implicit ev: <:<[T, AnyRef]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldBe null ^
- def shouldBe(right: DefinedWord)(implicit definition: Definition[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldBe defined ^
- def shouldBe(right: EmptyWord)(implicit emptiness: Emptiness[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldBe empty ^
- def shouldBe(right: WritableWord)(implicit writability: Writability[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldBe writable ^
- def shouldBe(right: ReadableWord)(implicit readability: Readability[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldBe readable ^
- macro def shouldBe(anType: ResultOfAnTypeInvocation[_]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
aDouble shouldBe an [Book] ^
- macro def shouldBe(aType: ResultOfATypeInvocation[_]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
aDouble shouldBe a [Book] ^
- def shouldBe(right: SortedWord)(implicit sortable: Sortable[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldBe sorted ^
- def shouldBe(spread: Spread[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldBe 7.1 +- 0.2 ^
- def shouldBe(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 shouldBe odd ^
- def shouldBe(comparison: ResultOfGreaterThanOrEqualToComparison[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
8 shouldBe >= (7) ^
- def shouldBe(comparison: ResultOfLessThanOrEqualToComparison[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
5 shouldBe <= (7) ^
- def shouldBe(comparison: ResultOfGreaterThanComparison[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
8 shouldBe > (7) ^
- def shouldBe(comparison: ResultOfLessThanComparison[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
5 shouldBe < (7) ^
- def shouldBe(right: Any): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
aDouble shouldBe 8.8 ^
- def shouldEqual(right: Null)(implicit ev: <:<[T, AnyRef]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldEqual null ^
- def shouldEqual(spread: Spread[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldEqual 7.1 +- 0.2 ^
- def shouldEqual(right: Any)(implicit equality: Equality[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
a shouldEqual b ^
- def shouldNot(includeWord: IncludeWord)(implicit ev: <:<[T, String]): ResultOfIncludeWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string shouldNot include regex ("hi") ^
- def shouldNot(endWithWord: EndWithWord)(implicit ev: <:<[T, String]): ResultOfEndWithWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string shouldNot endWith regex ("world") ^
- def shouldNot(startWithWord: StartWithWord)(implicit ev: <:<[T, String]): ResultOfStartWithWordForString
This method enables syntax such as the following:
This method enables syntax such as the following:
string shouldNot startWith regex ("hello") ^
- def shouldNot(existWord: ExistWord)(implicit existence: Existence[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
file shouldNot exist ^
- def shouldNot(contain: ContainWord): ResultOfContainWord[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
xs shouldNot contain (oneOf (1, 2, 3)) ^
- def shouldNot(haveWord: HaveWord): ResultOfHaveWordForExtent[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldNot have length (3) ^ result shouldNot have size (3) ^ exception shouldNot have message ("file not found") ^
- def shouldNot[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 shouldNot (be readable) ^
- def shouldNot(rightMatcherX1: Matcher[T]): Assertion
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldNot (be (3)) ^
- def shouldNot(beWord: BeWord): ResultOfBeWordForAny[T]
This method enables syntax such as the following:
This method enables syntax such as the following:
result shouldNot be (3) ^
- 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()