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
- Alphabetic
- By Inheritance
- StringMustWrapper
- StringMustWrapperForVerb
- AnyMustWrapper
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
-  new StringMustWrapper(leftSideString: String, 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 leftSideString: String- Definition Classes
- StringMustWrapper → StringMustWrapperForVerb
 
-    val leftSideValue: String- Definition Classes
- AnyMustWrapper
 
-   macro  def must(compileWord: CompileWord)(implicit pos: Position): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: string must compile ^
-    def must(fullyMatchWord: FullyMatchWord): ResultOfFullyMatchWordForStringThis method enables syntax such as the following: This method enables syntax such as the following: string must fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^
-    def must(resultOfAfterWordApplication: ResultOfAfterWordApplication)(implicit swawr: SubjectWithAfterWordRegistration): UnitSupports the registration of subject descriptions with after words in WordSpecandfixture.WordSpec.Supports the registration of subject descriptions with after words in WordSpecandfixture.WordSpec.For example, this method enables syntax such as the following in WordSpecandfixture.WordSpec:def provide = afterWord("provide") 
 "The ScalaTest Matchers DSL" must provide { ^WordSpecpasses in a function via the implicit parameter that takes two strings and aResultOfAfterWordApplicationand results inUnit. This method simply invokes this function, passing in leftSideString, the verb string"must", and theResultOfAfterWordApplicationpassed tomust.- Definition Classes
- StringMustWrapperForVerb
 
-    def must(right: => Unit)(implicit fun: StringVerbBlockRegistration): UnitSupports the registration of subject descriptions in WordSpecandfixture.WordSpec.Supports the registration of subject descriptions in WordSpecandfixture.WordSpec.For example, this method enables syntax such as the following in WordSpecandfixture.WordSpec:"A Stack (when empty)" must { ... ^WordSpecpasses in a function via the implicit parameter of typeStringVerbBlockRegistration, a function that takes two strings and a no-arg function and results inUnit. This method simply invokes this function, passing in leftSideString, the verb string"must", and the right by-name parameter transformed into a no-arg function.- Definition Classes
- StringMustWrapperForVerb
 
-    def must(right: BehaveWord)(implicit svbli: StringVerbBehaveLikeInvocation): BehaveWordSupports shared test registration in FlatSpecandfixture.FlatSpec.Supports shared test registration in FlatSpecandfixture.FlatSpec.For example, this method enables syntax such as the following in FlatSpecandfixture.FlatSpec:"A Stack (with one item)" must behave like nonEmptyStack(stackWithOneItem, lastValuePushed) ^FlatSpecandfixture.FlatSpecpasses in a function via the implicit parameter that takes a string and results in aBehaveWord. This method simply invokes this function, passing in leftSideString, and returns the result.- Definition Classes
- StringMustWrapperForVerb
 
-    def must(right: String)(implicit svsi: StringVerbStringInvocation): ResultOfStringPassedToVerbSupports test registration in FlatSpecandfixture.FlatSpec.Supports test registration in FlatSpecandfixture.FlatSpec.For example, this method enables syntax such as the following in FlatSpecandfixture.FlatSpec:"A Stack (when empty)" must "be empty" in { ... } ^ FlatSpecpasses in a function via the implicit parameter that takes three strings and results in aResultOfStringPassedToVerb. This method simply invokes this function, passing in leftSideString, the verb string"must", and right, and returns the result.- Definition Classes
- StringMustWrapperForVerb
 
-    def must(endWithWord: EndWithWord)(implicit ev: <:<[String, String]): ResultOfEndWithWordForStringThis method enables syntax such as the following: This method enables syntax such as the following: string must endWith regex ("world") ^- Definition Classes
- AnyMustWrapper
 
-    def must(startWithWord: StartWithWord)(implicit ev: <:<[String, String]): ResultOfStartWithWordForStringThis method enables syntax such as the following: This method enables syntax such as the following: string must startWith regex ("hello") ^- Definition Classes
- AnyMustWrapper
 
-    def must(includeWord: IncludeWord)(implicit ev: <:<[String, String]): ResultOfIncludeWordForStringThis method enables syntax such as the following: This method enables syntax such as the following: string must include regex ("hi") ^- Definition Classes
- AnyMustWrapper
 
-    def must(notExist: ResultOfNotExist)(implicit existence: Existence[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: file must not (exist) ^- Definition Classes
- AnyMustWrapper
 
-    def must(existWord: ExistWord)(implicit existence: Existence[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: file must exist ^- Definition Classes
- AnyMustWrapper
 
-    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
 
-    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
 
-    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
 
-    def must(inv: TripleEqualsInvocationOnSpread[String])(implicit ev: Numeric[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result must === (100 +- 1) ^ - Definition Classes
- AnyMustWrapper
 
-    def must[U](inv: TripleEqualsInvocation[U])(implicit constraint: CanEqual[String, U]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: a must === (b) ^- Definition Classes
- AnyMustWrapper
 
-    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
 
-    def must[TYPECLASS1[_], TYPECLASS2[_]](rightMatcherFactory2: MatcherFactory2[String, TYPECLASS1, TYPECLASS2])(implicit typeClass1: TYPECLASS1[String], typeClass2: TYPECLASS2[String]): AssertionThis 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
 
-    def must[TYPECLASS1[_]](rightMatcherFactory1: MatcherFactory1[String, TYPECLASS1])(implicit typeClass1: TYPECLASS1[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result must equal (3) ^- Definition Classes
- AnyMustWrapper
 
-    def must(rightMatcherX1: Matcher[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result must be (3) ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe[U >: String](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U])(implicit ev: <:<[String, AnyRef]): AssertionThis method enables the following syntax, where excellentReadrefers to aBePropertyMatcher[Book]:This method enables the following syntax, where excellentReadrefers to aBePropertyMatcher[Book]:programmingInScala mustBe an (excellentRead) ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe[U >: String](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U])(implicit ev: <:<[String, AnyRef]): AssertionThis method enables the following syntax, where goodReadrefers to aBePropertyMatcher[Book]:This method enables the following syntax, where goodReadrefers to aBePropertyMatcher[Book]:programmingInScala mustBe a (goodRead) ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(bePropertyMatcher: BePropertyMatcher[String])(implicit ev: <:<[String, AnyRef]): AssertionThis method enables the following syntax, where excellentReadrefers to aBePropertyMatcher[Book]:This method enables the following syntax, where excellentReadrefers to aBePropertyMatcher[Book]:programmingInScala mustBe excellentRead ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication)(implicit toAnyRef: <:<[String, AnyRef]): AssertionThis method enables the following syntax: This method enables the following syntax: list mustBe an ('empty) ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(resultOfAWordApplication: ResultOfAWordToSymbolApplication)(implicit toAnyRef: <:<[String, AnyRef]): AssertionThis method enables the following syntax: This method enables the following syntax: list mustBe a ('empty) ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(symbol: Symbol)(implicit toAnyRef: <:<[String, AnyRef]): AssertionThis method enables the following syntax: This method enables the following syntax: list mustBe 'empty ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(resultOfSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication)(implicit toAnyRef: <:<[String, AnyRef]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustBe theSameInstanceAs (anotherObject) ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(right: Null)(implicit ev: <:<[String, AnyRef]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustBe null ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(right: DefinedWord)(implicit definition: Definition[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustBe defined ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(right: EmptyWord)(implicit emptiness: Emptiness[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustBe empty ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(right: WritableWord)(implicit writability: Writability[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustBe writable ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(right: ReadableWord)(implicit readability: Readability[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustBe readable ^- Definition Classes
- AnyMustWrapper
 
-   macro  def mustBe(anType: ResultOfAnTypeInvocation[_]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: aDouble mustBe an [Book] ^- Definition Classes
- AnyMustWrapper
 
-   macro  def mustBe(aType: ResultOfATypeInvocation[_]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: aDouble mustBe a [Book] ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(right: SortedWord)(implicit sortable: Sortable[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustBe sorted ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(spread: Spread[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustBe 7.1 +- 0.2 ^ - Definition Classes
- AnyMustWrapper
 
-    def mustBe(beMatcher: BeMatcher[String]): AssertionThis method enables the following syntax, where oddrefers to aBeMatcher[Int]:This method enables the following syntax, where oddrefers to aBeMatcher[Int]:testing 1 mustBe odd ^- Definition Classes
- AnyMustWrapper
 
-    def mustBe(comparison: ResultOfGreaterThanOrEqualToComparison[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: 8 mustBe >= (7) ^ - Definition Classes
- AnyMustWrapper
 
-    def mustBe(comparison: ResultOfLessThanOrEqualToComparison[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: 5 mustBe <= (7) ^ - Definition Classes
- AnyMustWrapper
 
-    def mustBe(comparison: ResultOfGreaterThanComparison[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: 8 mustBe > (7) ^ - Definition Classes
- AnyMustWrapper
 
-    def mustBe(comparison: ResultOfLessThanComparison[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: 5 mustBe < (7) ^ - Definition Classes
- AnyMustWrapper
 
-    def mustBe(right: Any): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: aDouble mustBe 8.8 ^- Definition Classes
- AnyMustWrapper
 
-    def mustEqual(right: Null)(implicit ev: <:<[String, AnyRef]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustEqual null ^- Definition Classes
- AnyMustWrapper
 
-    def mustEqual(spread: Spread[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustEqual 7.1 +- 0.2 ^ - Definition Classes
- AnyMustWrapper
 
-    def mustEqual(right: Any)(implicit equality: Equality[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: a mustEqual b ^ - Definition Classes
- AnyMustWrapper
 
-   macro  def mustNot(typeCheckWord: TypeCheckWord)(implicit pos: Position): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: string mustNot typeCheck ^
-   macro  def mustNot(compileWord: CompileWord)(implicit pos: Position): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: string mustNot compile ^
-    def mustNot(fullyMatchWord: FullyMatchWord): ResultOfFullyMatchWordForStringThis method enables syntax such as the following: This method enables syntax such as the following: string mustNot fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^
-    def mustNot(includeWord: IncludeWord)(implicit ev: <:<[String, String]): ResultOfIncludeWordForStringThis method enables syntax such as the following: This method enables syntax such as the following: string mustNot include regex ("hi") ^- Definition Classes
- AnyMustWrapper
 
-    def mustNot(endWithWord: EndWithWord)(implicit ev: <:<[String, String]): ResultOfEndWithWordForStringThis method enables syntax such as the following: This method enables syntax such as the following: string mustNot endWith regex ("world") ^- Definition Classes
- AnyMustWrapper
 
-    def mustNot(startWithWord: StartWithWord)(implicit ev: <:<[String, String]): ResultOfStartWithWordForStringThis method enables syntax such as the following: This method enables syntax such as the following: string mustNot startWith regex ("hello") ^- Definition Classes
- AnyMustWrapper
 
-    def mustNot(existWord: ExistWord)(implicit existence: Existence[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: file mustNot exist ^- Definition Classes
- AnyMustWrapper
 
-    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
 
-    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
 
-    def mustNot[TYPECLASS1[_]](rightMatcherFactory1: MatcherFactory1[String, TYPECLASS1])(implicit typeClass1: TYPECLASS1[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustNot (be readable) ^- Definition Classes
- AnyMustWrapper
 
-    def mustNot(rightMatcherX1: Matcher[String]): AssertionThis method enables syntax such as the following: This method enables syntax such as the following: result mustNot (be (3)) ^- Definition Classes
- AnyMustWrapper
 
-    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
 
-   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- Definition Classes
- AnyMustWrapper
 
-    val prettifier: Prettifier- Definition Classes
- AnyMustWrapper
 
-   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()
 
-    def withGroup(group: String): RegexWithGroupsThis method enables syntax such as the following: This method enables syntax such as the following: string must fullyMatch regex ("a(b*)c" withGroup "bb") ^ 
-    def withGroups(groups: String*): RegexWithGroupsThis 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")) ^