org.scalatest.matchers.must.Matchers

StringMustWrapper

final class StringMustWrapper extends AnyMustWrapper[String] with StringMustWrapperForVerb

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 Strings.

Source
Matchers.scala
Linear Supertypes
Matchers.StringMustWrapperForVerb, AnyMustWrapper[String], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. StringMustWrapper
  2. StringMustWrapperForVerb
  3. AnyMustWrapper
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StringMustWrapper(leftSideString: String, 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 leftSideString: String

    Definition Classes
    StringMustWrapper → StringMustWrapperForVerb
  15. val leftSideValue: String

    Definition Classes
    AnyMustWrapper
  16. def must(compileWord: CompileWord)(implicit pos: Position): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string must compile
           ^
    

    Annotations
    @macroImpl( ... )
  17. def must(fullyMatchWord: FullyMatchWord): ResultOfFullyMatchWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string must fullyMatch regex ("""(-)?(\d+)(\.\d*)?""")
           ^
    

  18. def must(resultOfAfterWordApplication: ResultOfAfterWordApplication)(implicit swawr: SubjectWithAfterWordRegistration): Unit

    Definition Classes
    StringMustWrapperForVerb
  19. def must(right: ⇒ Unit)(implicit fun: StringVerbBlockRegistration): Unit

    Definition Classes
    StringMustWrapperForVerb
  20. def must(right: BehaveWord)(implicit svbli: StringVerbBehaveLikeInvocation): BehaveWord

    Definition Classes
    StringMustWrapperForVerb
  21. def must(right: String)(implicit svsi: StringVerbStringInvocation): ResultOfStringPassedToVerb

    Definition Classes
    StringMustWrapperForVerb
  22. def must(endWithWord: EndWithWord)(implicit ev: <:<[String, String]): ResultOfEndWithWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string must endWith regex ("world")
           ^
    

    Definition Classes
    AnyMustWrapper
  23. def must(startWithWord: StartWithWord)(implicit ev: <:<[String, String]): ResultOfStartWithWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string must startWith regex ("hello")
           ^
    

    Definition Classes
    AnyMustWrapper
  24. def must(includeWord: IncludeWord)(implicit ev: <:<[String, String]): ResultOfIncludeWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string must include regex ("hi")
           ^
    

    Definition Classes
    AnyMustWrapper
  25. def must(notExist: ResultOfNotExist)(implicit existence: Existence[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    file must not (exist)
         ^
    

    Definition Classes
    AnyMustWrapper
  26. def must(existWord: ExistWord)(implicit existence: Existence[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    file must exist
         ^
    

    Definition Classes
    AnyMustWrapper
  27. def must(containWord: ContainWord): ResultOfContainWord[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    xs must contain oneOf (1, 2, 3)
       ^
    

    Definition Classes
    AnyMustWrapper
  28. def must(haveWord: HaveWord): ResultOfHaveWordForExtent[String]

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

    Definition Classes
    AnyMustWrapper
  29. def must(beWord: BeWord): ResultOfBeWordForAny[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result must be a aMatcher
           ^
    

    Definition Classes
    AnyMustWrapper
  30. def must(inv: TripleEqualsInvocationOnSpread[String])(implicit ev: Numeric[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result must === (100 +- 1)
           ^
    

    Definition Classes
    AnyMustWrapper
  31. def must[U](inv: TripleEqualsInvocation[U])(implicit constraint: CanEqual[String, U]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    a must === (b)
           ^
    

    Definition Classes
    AnyMustWrapper
  32. def must(notWord: NotWord): ResultOfNotWordForAny[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result must not equal (3)
           ^
    

    Definition Classes
    AnyMustWrapper
  33. def must[TYPECLASS1[_], TYPECLASS2[_]](rightMatcherFactory2: MatcherFactory2[String, TYPECLASS1, TYPECLASS2])(implicit typeClass1: TYPECLASS1[String], typeClass2: TYPECLASS2[String]): 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)
           ^
    

    Definition Classes
    AnyMustWrapper
  34. def must[TYPECLASS1[_]](rightMatcherFactory1: MatcherFactory1[String, TYPECLASS1])(implicit typeClass1: TYPECLASS1[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result must equal (3)
           ^
    

    Definition Classes
    AnyMustWrapper
  35. def must(rightMatcherX1: Matcher[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result must be (3)
           ^
    

    Definition Classes
    AnyMustWrapper
  36. def mustBe[U >: String](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U])(implicit ev: <:<[String, 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 mustBe an (excellentRead)
                       ^
    

    Definition Classes
    AnyMustWrapper
  37. def mustBe[U >: String](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U])(implicit ev: <:<[String, 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 mustBe a (goodRead)
                       ^
    

    Definition Classes
    AnyMustWrapper
  38. def mustBe(bePropertyMatcher: BePropertyMatcher[String])(implicit ev: <:<[String, 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 mustBe excellentRead
                       ^
    

    Definition Classes
    AnyMustWrapper
  39. def mustBe(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication)(implicit toAnyRef: <:<[String, AnyRef]): Assertion

    This method enables the following syntax:

    This method enables the following syntax:

    list mustBe an ('empty)
         ^
    

    Definition Classes
    AnyMustWrapper
  40. def mustBe(resultOfAWordApplication: ResultOfAWordToSymbolApplication)(implicit toAnyRef: <:<[String, AnyRef]): Assertion

    This method enables the following syntax:

    This method enables the following syntax:

    list mustBe a ('empty)
         ^
    

    Definition Classes
    AnyMustWrapper
  41. def mustBe(symbol: Symbol)(implicit toAnyRef: <:<[String, AnyRef]): Assertion

    This method enables the following syntax:

    This method enables the following syntax:

    list mustBe 'empty
         ^
    

    Definition Classes
    AnyMustWrapper
  42. def mustBe(resultOfSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication)(implicit toAnyRef: <:<[String, AnyRef]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustBe theSameInstanceAs (anotherObject)
           ^
    

    Definition Classes
    AnyMustWrapper
  43. def mustBe(right: Null)(implicit ev: <:<[String, AnyRef]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustBe null
           ^
    

    Definition Classes
    AnyMustWrapper
  44. def mustBe(right: DefinedWord)(implicit definition: Definition[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustBe defined
           ^
    

    Definition Classes
    AnyMustWrapper
  45. def mustBe(right: EmptyWord)(implicit emptiness: Emptiness[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustBe empty
           ^
    

    Definition Classes
    AnyMustWrapper
  46. def mustBe(right: WritableWord)(implicit writability: Writability[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustBe writable
           ^
    

    Definition Classes
    AnyMustWrapper
  47. def mustBe(right: ReadableWord)(implicit readability: Readability[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustBe readable
           ^
    

    Definition Classes
    AnyMustWrapper
  48. 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]
            ^
    

    Definition Classes
    AnyMustWrapper
    Annotations
    @macroImpl( ... )
  49. 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]
            ^
    

    Definition Classes
    AnyMustWrapper
    Annotations
    @macroImpl( ... )
  50. def mustBe(right: SortedWord)(implicit sortable: Sortable[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustBe sorted
           ^
    

    Definition Classes
    AnyMustWrapper
  51. def mustBe(spread: Spread[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustBe 7.1 +- 0.2
           ^
    

    Definition Classes
    AnyMustWrapper
  52. def mustBe(beMatcher: BeMatcher[String]): 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 mustBe odd
      ^
    

    Definition Classes
    AnyMustWrapper
  53. def mustBe(comparison: ResultOfGreaterThanOrEqualToComparison[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    8 mustBe >= (7)
      ^
    

    Definition Classes
    AnyMustWrapper
  54. def mustBe(comparison: ResultOfLessThanOrEqualToComparison[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    5 mustBe <= (7)
      ^
    

    Definition Classes
    AnyMustWrapper
  55. def mustBe(comparison: ResultOfGreaterThanComparison[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    8 mustBe > (7)
      ^
    

    Definition Classes
    AnyMustWrapper
  56. def mustBe(comparison: ResultOfLessThanComparison[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    5 mustBe < (7)
      ^
    

    Definition Classes
    AnyMustWrapper
  57. 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
            ^
    

    Definition Classes
    AnyMustWrapper
  58. def mustEqual(right: Null)(implicit ev: <:<[String, AnyRef]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustEqual null
           ^
    

    Definition Classes
    AnyMustWrapper
  59. def mustEqual(spread: Spread[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustEqual 7.1 +- 0.2
           ^
    

    Definition Classes
    AnyMustWrapper
  60. def mustEqual(right: Any)(implicit equality: Equality[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    a mustEqual b
      ^
    

    Definition Classes
    AnyMustWrapper
  61. def mustNot(typeCheckWord: TypeCheckWord)(implicit pos: Position): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string mustNot typeCheck
           ^
    

    Annotations
    @macroImpl( ... )
  62. def mustNot(compileWord: CompileWord)(implicit pos: Position): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string mustNot compile
           ^
    

    Annotations
    @macroImpl( ... )
  63. def mustNot(fullyMatchWord: FullyMatchWord): ResultOfFullyMatchWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string mustNot fullyMatch regex ("""(-)?(\d+)(\.\d*)?""")
           ^
    

  64. def mustNot(includeWord: IncludeWord)(implicit ev: <:<[String, String]): ResultOfIncludeWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string mustNot include regex ("hi")
           ^
    

    Definition Classes
    AnyMustWrapper
  65. def mustNot(endWithWord: EndWithWord)(implicit ev: <:<[String, String]): ResultOfEndWithWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string mustNot endWith regex ("world")
           ^
    

    Definition Classes
    AnyMustWrapper
  66. def mustNot(startWithWord: StartWithWord)(implicit ev: <:<[String, String]): ResultOfStartWithWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string mustNot startWith regex ("hello")
           ^
    

    Definition Classes
    AnyMustWrapper
  67. def mustNot(existWord: ExistWord)(implicit existence: Existence[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    file mustNot exist
         ^
    

    Definition Classes
    AnyMustWrapper
  68. def mustNot(contain: ContainWord): ResultOfContainWord[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    xs mustNot contain (oneOf (1, 2, 3))
       ^
    

    Definition Classes
    AnyMustWrapper
  69. def mustNot(haveWord: HaveWord): ResultOfHaveWordForExtent[String]

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

    Definition Classes
    AnyMustWrapper
  70. def mustNot[TYPECLASS1[_]](rightMatcherFactory1: MatcherFactory1[String, TYPECLASS1])(implicit typeClass1: TYPECLASS1[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustNot (be readable)
           ^
    

    Definition Classes
    AnyMustWrapper
  71. def mustNot(rightMatcherX1: Matcher[String]): Assertion

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustNot (be (3))
           ^
    

    Definition Classes
    AnyMustWrapper
  72. def mustNot(beWord: BeWord): ResultOfBeWordForAny[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result mustNot be (3)
           ^
    

    Definition Classes
    AnyMustWrapper
  73. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  76. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  77. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  81. def withGroup(group: String): RegexWithGroups

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string must fullyMatch regex ("a(b*)c" withGroup "bb")
                                             ^
    

  82. def withGroups(groups: String*): RegexWithGroups

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string must fullyMatch regex ("a(b*)(c*)" withGroups ("bb", "cc"))
                                                ^
    

Inherited from Matchers.StringMustWrapperForVerb

Inherited from AnyMustWrapper[String]

Inherited from AnyRef

Inherited from Any

Ungrouped