org.scalatest.WillMatchers

StringWillWrapper

final class StringWillWrapper extends AnyWillWrapper[String] with StringWillWrapperForVerb

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 will methods to be invoked on Strings.

Linear Supertypes
WillMatchers.StringWillWrapperForVerb, AnyWillWrapper[String], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. StringWillWrapper
  2. StringWillWrapperForVerb
  3. AnyWillWrapper
  4. AnyRef
  5. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

  1. new StringWillWrapper(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
    StringWillWrapper → StringWillWrapperForVerb
  15. val leftSideValue: String

    Definition Classes
    AnyWillWrapper
  16. final def ne(arg0: AnyRef): Boolean

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

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

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

    Definition Classes
    AnyRef
  20. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  24. def will(compileWord: CompileWord)(implicit prettifier: Prettifier, pos: Position): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string will compile
           ^
    

    Annotations
    @macroImpl( ... )
  25. def will(fullyMatchWord: FullyMatchWord): ResultOfFullyMatchWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

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

  26. def will(resultOfAfterWordApplication: ResultOfAfterWordApplication)(implicit swawr: SubjectWithAfterWordRegistration): Unit

    Supports the registration of subject descriptions with after words in WordSpec and fixture.WordSpec.

    Supports the registration of subject descriptions with after words in WordSpec and fixture.WordSpec.

    For example, this method enables syntax such as the following in WordSpec and fixture.WordSpec:

       def provide = afterWord("provide")
    
      "The ScalaTest Matchers DSL" will provide {
                                   ^
    

    WordSpec passes in a function via the implicit parameter that takes two strings and a ResultOfAfterWordApplication and results in Unit. This method simply invokes this function, passing in leftSideString, the verb string "will", and the ResultOfAfterWordApplication passed to will.

    Definition Classes
    StringWillWrapperForVerb
  27. def will(right: ⇒ Unit)(implicit fun: StringVerbBlockRegistration): Unit

    Supports the registration of subject descriptions in WordSpec and fixture.WordSpec.

    Supports the registration of subject descriptions in WordSpec and fixture.WordSpec.

    For example, this method enables syntax such as the following in WordSpec and fixture.WordSpec:

    "A Stack (when empty)" will { ...
                           ^
    

    WordSpec passes in a function via the implicit parameter of type StringVerbBlockRegistration, a function that takes two strings and a no-arg function and results in Unit. This method simply invokes this function, passing in leftSideString, the verb string "will", and the right by-name parameter transformed into a no-arg function.

    Definition Classes
    StringWillWrapperForVerb
  28. def will(right: BehaveWord)(implicit svbli: StringVerbBehaveLikeInvocation): BehaveWord

    Supports shared test registration in FlatSpec and fixture.FlatSpec.

    Supports shared test registration in FlatSpec and fixture.FlatSpec.

    For example, this method enables syntax such as the following in FlatSpec and fixture.FlatSpec:

    "A Stack (with one item)" will behave like nonEmptyStack(stackWithOneItem, lastValuePushed)
                              ^
    

    FlatSpec and fixture.FlatSpec passes in a function via the implicit parameter that takes a string and results in a BehaveWord. This method simply invokes this function, passing in leftSideString, and returns the result.

    Definition Classes
    StringWillWrapperForVerb
  29. def will(right: String)(implicit svsi: StringVerbStringInvocation): ResultOfStringPassedToVerb

    Supports test registration in FlatSpec and fixture.FlatSpec.

    Supports test registration in FlatSpec and fixture.FlatSpec.

    For example, this method enables syntax such as the following in FlatSpec and fixture.FlatSpec:

    "A Stack (when empty)" will "be empty" in { ... }
                           ^
    

    FlatSpec passes in a function via the implicit parameter that takes three strings and results in a ResultOfStringPassedToVerb. This method simply invokes this function, passing in leftSideString, the verb string "will", and right, and returns the result.

    Definition Classes
    StringWillWrapperForVerb
  30. def will(endWithWord: EndWithWord)(implicit ev: <:<[String, String]): ResultOfEndWithWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string will endWith regex ("world")
           ^
    

    Definition Classes
    AnyWillWrapper
  31. def will(startWithWord: StartWithWord)(implicit ev: <:<[String, String]): ResultOfStartWithWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string will startWith regex ("hello")
           ^
    

    Definition Classes
    AnyWillWrapper
  32. def will(includeWord: IncludeWord)(implicit ev: <:<[String, String]): ResultOfIncludeWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string will include regex ("hi")
           ^
    

    Definition Classes
    AnyWillWrapper
  33. def will(notExist: ResultOfNotExist)(implicit existence: Existence[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    file will not (exist)
         ^
    

    Definition Classes
    AnyWillWrapper
  34. def will(existWord: ExistWord)(implicit existence: Existence[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    file will exist
         ^
    

    Definition Classes
    AnyWillWrapper
  35. def will(containWord: ContainWord): FactResultOfContainWord[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

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

    Definition Classes
    AnyWillWrapper
  36. def will(haveWord: HaveWord): ResultOfHaveWordForExtent[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result will have length (3)
           ^
    result will have size (3)
           ^
    

    Definition Classes
    AnyWillWrapper
  37. def will(beWord: BeWord): ResultOfBeWordForAny[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result will be a aMatcher
           ^
    

    Definition Classes
    AnyWillWrapper
  38. def will(inv: TripleEqualsInvocationOnSpread[String])(implicit ev: Numeric[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

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

    Definition Classes
    AnyWillWrapper
  39. def will[U](inv: TripleEqualsInvocation[U])(implicit constraint: CanEqual[String, U]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    a will === (b)
           ^
    

    Definition Classes
    AnyWillWrapper
  40. def will(notWord: NotWord): FactResultOfNotWordForAny[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result will not equal (3)
           ^
    

    Definition Classes
    AnyWillWrapper
  41. def will[TYPECLASS1[_], TYPECLASS2[_]](rightMatcherFactory2: MatcherFactory2[String, TYPECLASS1, TYPECLASS2])(implicit typeClass1: TYPECLASS1[String], typeClass2: TYPECLASS2[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result will (equal (expected) and have length 3)
           ^
    

    Definition Classes
    AnyWillWrapper
  42. def will[TYPECLASS1[_]](rightMatcherFactory1: MatcherFactory1[String, TYPECLASS1])(implicit typeClass1: TYPECLASS1[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result will equal (3)
           ^
    

    Definition Classes
    AnyWillWrapper
  43. def will(rightMatcherX1: Matcher[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result will be (3)
           ^
    

    Definition Classes
    AnyWillWrapper
  44. def willBe[U >: String](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U])(implicit ev: <:<[String, AnyRef]): Fact

    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 willBe an (excellentRead)
                       ^
    

    Definition Classes
    AnyWillWrapper
  45. def willBe[U >: String](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U])(implicit ev: <:<[String, AnyRef]): Fact

    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 willBe a (goodRead)
                       ^
    

    Definition Classes
    AnyWillWrapper
  46. def willBe(bePropertyMatcher: BePropertyMatcher[String])(implicit ev: <:<[String, AnyRef]): Fact

    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 willBe excellentRead
                       ^
    

    Definition Classes
    AnyWillWrapper
  47. def willBe(resultOfSameInstanceAsApplication: ResultOfTheSameInstanceAsApplication)(implicit toAnyRef: <:<[String, AnyRef]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willBe theSameInstanceAs (anotherObject)
           ^
    

    Definition Classes
    AnyWillWrapper
  48. def willBe(right: Null)(implicit ev: <:<[String, AnyRef]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willBe null
           ^
    

    Definition Classes
    AnyWillWrapper
  49. def willBe(right: DefinedWord)(implicit definition: Definition[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willBe defined
           ^
    

    Definition Classes
    AnyWillWrapper
  50. def willBe(right: EmptyWord)(implicit emptiness: Emptiness[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willBe empty
           ^
    

    Definition Classes
    AnyWillWrapper
  51. def willBe(right: WritableWord)(implicit writability: Writability[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willBe writable
           ^
    

    Definition Classes
    AnyWillWrapper
  52. def willBe(right: ReadableWord)(implicit readability: Readability[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willBe readable
           ^
    

    Definition Classes
    AnyWillWrapper
  53. def willBe(anType: FactResultOfAnTypeInvocation[_]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    aDouble willBe an [Book]
            ^
    

    Definition Classes
    AnyWillWrapper
    Annotations
    @macroImpl( ... )
  54. def willBe(aType: FactResultOfATypeInvocation[_]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    aDouble willBe a [Book]
            ^
    

    Definition Classes
    AnyWillWrapper
    Annotations
    @macroImpl( ... )
  55. def willBe(right: SortedWord)(implicit sortable: Sortable[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willBe sorted
           ^
    

    Definition Classes
    AnyWillWrapper
  56. def willBe(spread: Spread[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willBe 7.1 +- 0.2
           ^
    

    Definition Classes
    AnyWillWrapper
  57. def willBe(beMatcher: BeMatcher[String]): Fact

    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 willBe odd
      ^
    

    Definition Classes
    AnyWillWrapper
  58. def willBe(comparison: ResultOfGreaterThanOrEqualToComparison[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    8 willBe >= (7)
      ^
    

    Definition Classes
    AnyWillWrapper
  59. def willBe(comparison: ResultOfLessThanOrEqualToComparison[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    5 willBe <= (7)
      ^
    

    Definition Classes
    AnyWillWrapper
  60. def willBe(comparison: ResultOfGreaterThanComparison[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    8 willBe > (7)
      ^
    

    Definition Classes
    AnyWillWrapper
  61. def willBe(comparison: ResultOfLessThanComparison[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    5 willBe < (7)
      ^
    

    Definition Classes
    AnyWillWrapper
  62. def willBe(right: Any): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    aDouble willBe 8.8
            ^
    

    Definition Classes
    AnyWillWrapper
  63. def willEqual(right: Null)(implicit ev: <:<[String, AnyRef]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willEqual null
           ^
    

    Definition Classes
    AnyWillWrapper
  64. def willEqual(spread: Spread[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willEqual 7.1 +- 0.2
           ^
    

    Definition Classes
    AnyWillWrapper
  65. def willEqual(right: Any)(implicit equality: Equality[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    a willEqual b
      ^
    

    Definition Classes
    AnyWillWrapper
  66. def willNot(typeCheckWord: TypeCheckWord)(implicit prettifier: Prettifier, pos: Position): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string willNot typeCheck
           ^
    

    Annotations
    @macroImpl( ... )
  67. def willNot(compileWord: CompileWord)(implicit prettifier: Prettifier, pos: Position): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string willNot compile
           ^
    

    Annotations
    @macroImpl( ... )
  68. def willNot(fullyMatchWord: FullyMatchWord): ResultOfFullyMatchWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

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

  69. def willNot(includeWord: IncludeWord)(implicit ev: <:<[String, String]): ResultOfIncludeWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string willNot include regex ("hi")
           ^
    

    Definition Classes
    AnyWillWrapper
  70. def willNot(endWithWord: EndWithWord)(implicit ev: <:<[String, String]): ResultOfEndWithWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string willNot endWith regex ("world")
           ^
    

    Definition Classes
    AnyWillWrapper
  71. def willNot(startWithWord: StartWithWord)(implicit ev: <:<[String, String]): ResultOfStartWithWordForString

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    string willNot startWith regex ("hello")
           ^
    

    Definition Classes
    AnyWillWrapper
  72. def willNot(existWord: ExistWord)(implicit existence: Existence[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    file willNot exist
         ^
    

    Definition Classes
    AnyWillWrapper
  73. def willNot(contain: ContainWord): FactResultOfContainWord[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

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

    Definition Classes
    AnyWillWrapper
  74. def willNot(haveWord: HaveWord): ResultOfHaveWordForExtent[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willNot have length (3)
           ^
    result willNot have size (3)
           ^
    exception willNot have message ("file not found")
              ^
    

    Definition Classes
    AnyWillWrapper
  75. def willNot[TYPECLASS1[_]](rightMatcherFactory1: MatcherFactory1[String, TYPECLASS1])(implicit typeClass1: TYPECLASS1[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willNot (be readable)
           ^
    

    Definition Classes
    AnyWillWrapper
  76. def willNot(rightMatcherX1: Matcher[String]): Fact

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willNot (be (3))
           ^
    

    Definition Classes
    AnyWillWrapper
  77. def willNot(beWord: BeWord): ResultOfBeWordForAny[String]

    This method enables syntax such as the following:

    This method enables syntax such as the following:

    result willNot be (3)
           ^
    

    Definition Classes
    AnyWillWrapper
  78. def withGroup(group: String): RegexWithGroups

    This method enables syntax such as the following:

    This method enables syntax such as the following:

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

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

    This method enables syntax such as the following:

    This method enables syntax such as the following:

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

Inherited from WillMatchers.StringWillWrapperForVerb

Inherited from AnyWillWrapper[String]

Inherited from AnyRef

Inherited from Any

Ungrouped