ScalaTest 1.0
|
|
final
class
StringMustWrapper(left : java.lang.String)
extends
StringMustWrapperForVerbMustMatchers
or ShouldMatchers
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 String
s.
Method Summary | |
def
|
must
(haveWord : HaveWord) : ResultOfHaveWordForString
This method enables syntax such as the following:
string must have length (3) ^ |
def
|
must
(rightMatcher : Matcher[java.lang.String]) : Unit
This method enables syntax such as the following:
string must equal ("hi") ^ |
def
|
must
(fullyMatchWord : FullyMatchWord) : ResultOfFullyMatchWordForString
This method enables syntax such as the following:
string must fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^ |
def
|
must
(includeWord : IncludeWord) : ResultOfIncludeWordForString
This method enables syntax such as the following:
string must include regex ("hi") ^ |
def
|
must
(beWord : BeWord) : ResultOfBeWordForAnyRef[java.lang.String]
This method enables syntax such as the following:
string must be theSameInstanceAs anotherObject ^ |
def
|
must
(startWithWord : StartWithWord) : ResultOfStartWithWordForString
This method enables syntax such as the following:
string must startWith regex ("hello") ^ |
def
|
must
(notWord : NotWord) : ResultOfNotWordForString
This method enables syntax such as the following:
string must not have length (3) ^ |
def
|
must
(endWithWord : EndWithWord) : ResultOfEndWithWordForString
This method enables syntax such as the following:
string must endWith regex ("world") ^ |
Methods inherited from StringMustWrapperForVerb | |
must, must, must, must |
Methods inherited from AnyRef | |
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized |
Methods inherited from Any | |
==, !=, isInstanceOf, asInstanceOf |
Method Details |
def
must(rightMatcher : Matcher[java.lang.String]) : Unit
string must equal ("hi") ^
def
must(beWord : BeWord) : ResultOfBeWordForAnyRef[java.lang.String]
string must be theSameInstanceAs anotherObject ^
def
must(haveWord : HaveWord) : ResultOfHaveWordForString
string must have length (3) ^
def
must(includeWord : IncludeWord) : ResultOfIncludeWordForString
string must include regex ("hi") ^
def
must(startWithWord : StartWithWord) : ResultOfStartWithWordForString
string must startWith regex ("hello") ^
def
must(endWithWord : EndWithWord) : ResultOfEndWithWordForString
string must endWith regex ("world") ^
def
must(fullyMatchWord : FullyMatchWord) : ResultOfFullyMatchWordForString
string must fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^
def
must(notWord : NotWord) : ResultOfNotWordForString
string must not have length (3) ^
ScalaTest 1.0
|
|