org.scalatest.Matchers

AnyShouldWrapper

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.

Linear Supertypes
AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AnyShouldWrapper
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new AnyShouldWrapper(leftSideValue: T, pos: Position, prettifier: Prettifier)

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

    Definition Classes
    AnyRef → Any
  4. final def ==(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  5. final def ==(arg0: Any): Boolean

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]

    Definition Classes
    AnyRef → Any
  12. def hashCode(): Int

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. val leftSideValue: T

  15. final def ne(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  16. final def notify(): Unit

    Definition Classes
    AnyRef
  17. final def notifyAll(): Unit

    Definition Classes
    AnyRef
  18. val pos: Position

  19. val prettifier: Prettifier

  20. 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")
           ^
    

  21. 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")
           ^
    

  22. 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")
           ^
    

  23. 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)
         ^
    

  24. 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
         ^
    

  25. 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)
       ^
    

  26. 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)
           ^
    

  27. 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
           ^
    

  28. 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)
           ^
    

  29. 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)
           ^
    

  30. 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)
           ^
    

  31. 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)
           ^
    

  32. 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)
           ^
    

  33. 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)
           ^
    

  34. def shouldBe[U >: T](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U])(implicit ev: <:<[T, AnyRef]): Assertion

    This method enables the following syntax, where excellentRead refers to a BePropertyMatcher[Book]:

    This method enables the following syntax, where excellentRead refers to a BePropertyMatcher[Book]:

    programmingInScala shouldBe an (excellentRead)
                       ^
    

  35. def shouldBe[U >: T](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U])(implicit ev: <:<[T, AnyRef]): Assertion

    This method enables the following syntax, where goodRead refers to a BePropertyMatcher[Book]:

    This method enables the following syntax, where goodRead refers to a BePropertyMatcher[Book]:

    programmingInScala shouldBe a (goodRead)
                       ^
    

  36. def shouldBe(bePropertyMatcher: BePropertyMatcher[T])(implicit ev: <:<[T, AnyRef]): Assertion

    This method enables the following syntax, where excellentRead refers to a BePropertyMatcher[Book]:

    This method enables the following syntax, where excellentRead refers to a BePropertyMatcher[Book]:

    programmingInScala shouldBe excellentRead
                       ^
    

  37. 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)
           ^
    

  38. 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
           ^
    

  39. 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
           ^
    

  40. 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
           ^
    

  41. 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
           ^
    

  42. 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
           ^
    

  43. 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]
            ^
    

    Annotations
    @macroImpl( ... )
  44. 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]
            ^
    

    Annotations
    @macroImpl( ... )
  45. 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
           ^
    

  46. 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
           ^
    

  47. def shouldBe(beMatcher: BeMatcher[T]): Assertion

    This method enables the following syntax, where odd refers to a BeMatcher[Int]:

    This method enables the following syntax, where odd refers to a BeMatcher[Int]:

    testing
    1 shouldBe odd
      ^
    

  48. 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)
      ^
    

  49. 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)
      ^
    

  50. 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)
      ^
    

  51. 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)
      ^
    

  52. 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
            ^
    

  53. 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
           ^
    

  54. 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
           ^
    

  55. 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
      ^
    

  56. 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")
           ^
    

  57. 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")
           ^
    

  58. 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")
           ^
    

  59. 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
         ^
    

  60. 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))
       ^
    

  61. 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")
              ^
    

  62. 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)
           ^
    

  63. 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))
           ^
    

  64. 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)
           ^
    

  65. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  66. def toString(): String

    Definition Classes
    AnyRef → Any
  67. final def wait(): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  68. final def wait(arg0: Long, arg1: Int): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  69. final def wait(arg0: Long): Unit

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped