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.
- Source
- WillMatchers.scala
- Alphabetic
- By Inheritance
- StringWillWrapper
- StringWillWrapperForVerb
- AnyWillWrapper
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Instance Constructors
- new StringWillWrapper(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[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
final
def
getClass(): Class[_]
- 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
- StringWillWrapper → StringWillWrapperForVerb
-
val
leftSideValue: String
- Definition Classes
- AnyWillWrapper
-
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
- AnyWillWrapper
-
val
prettifier: Prettifier
- Definition Classes
- AnyWillWrapper
-
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( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
macro
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 ^ -
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*)?""") ^ -
def
will(resultOfAfterWordApplication: ResultOfAfterWordApplication)(implicit swawr: SubjectWithAfterWordRegistration): Unit
Supports 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" will 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"will", and theResultOfAfterWordApplicationpassed towill.- Definition Classes
- StringWillWrapperForVerb
-
def
will(right: ⇒ Unit)(implicit fun: StringVerbBlockRegistration): Unit
Supports 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)" will { ... ^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"will", and the right by-name parameter transformed into a no-arg function.- Definition Classes
- StringWillWrapperForVerb
-
def
will(right: BehaveWord)(implicit svbli: StringVerbBehaveLikeInvocation): BehaveWord
Supports 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)" will 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
- StringWillWrapperForVerb
-
def
will(right: String)(implicit svsi: StringVerbStringInvocation): ResultOfStringPassedToVerb
Supports 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)" will "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"will", and right, and returns the result.- Definition Classes
- StringWillWrapperForVerb
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
def
willBe[U >: String](resultOfAnWordApplication: ResultOfAnWordToBePropertyMatcherApplication[U])(implicit ev: <:<[String, AnyRef]): Fact
This method enables the following syntax, where
excellentReadrefers to aBePropertyMatcher[Book]:This method enables the following syntax, where
excellentReadrefers to aBePropertyMatcher[Book]:programmingInScala willBe an (excellentRead) ^- Definition Classes
- AnyWillWrapper
-
def
willBe[U >: String](resultOfAWordApplication: ResultOfAWordToBePropertyMatcherApplication[U])(implicit ev: <:<[String, AnyRef]): Fact
This method enables the following syntax, where
goodReadrefers to aBePropertyMatcher[Book]:This method enables the following syntax, where
goodReadrefers to aBePropertyMatcher[Book]:programmingInScala willBe a (goodRead) ^- Definition Classes
- AnyWillWrapper
-
def
willBe(bePropertyMatcher: BePropertyMatcher[String])(implicit ev: <:<[String, AnyRef]): Fact
This method enables the following syntax, where
excellentReadrefers to aBePropertyMatcher[Book]:This method enables the following syntax, where
excellentReadrefers to aBePropertyMatcher[Book]:programmingInScala willBe excellentRead ^- Definition Classes
- AnyWillWrapper
-
def
willBe(resultOfAnWordApplication: ResultOfAnWordToSymbolApplication)(implicit toAnyRef: <:<[String, AnyRef]): Fact
This method enables the following syntax:
This method enables the following syntax:
list willBe an ('empty) ^- Definition Classes
- AnyWillWrapper
-
def
willBe(resultOfAWordApplication: ResultOfAWordToSymbolApplication)(implicit toAnyRef: <:<[String, AnyRef]): Fact
This method enables the following syntax:
This method enables the following syntax:
list willBe a ('empty) ^- Definition Classes
- AnyWillWrapper
-
def
willBe(symbol: Symbol)(implicit toAnyRef: <:<[String, AnyRef]): Fact
This method enables the following syntax:
This method enables the following syntax:
list willBe 'empty ^- Definition Classes
- AnyWillWrapper
-
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
-
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
-
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
-
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
-
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
-
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
-
macro
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
-
macro
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
-
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
-
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
-
def
willBe(beMatcher: BeMatcher[String]): Fact
This method enables the following syntax, where
oddrefers to aBeMatcher[Int]:This method enables the following syntax, where
oddrefers to aBeMatcher[Int]:testing 1 willBe odd ^
- Definition Classes
- AnyWillWrapper
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
macro
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 ^ -
macro
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 ^ -
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*)?""") ^ -
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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
-
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") ^ -
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")) ^