ScalaTest 1.1
|
|
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
(beWord : BeWord) : ResultOfBeWordForAnyRef[java.lang.String]
This method enables syntax such as the following:
string must be theSameInstanceAs anotherObject ^ |
def
|
must
(fullyMatchWord : FullyMatchWord) : ResultOfFullyMatchWordForString
This method enables syntax such as the following:
string must fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^ |
def
|
must
(startWithWord : StartWithWord) : ResultOfStartWithWordForString
This method enables syntax such as the following:
string must startWith regex ("hello") ^ |
def
|
must
(rightMatcher : Matcher[java.lang.String]) : Unit
This method enables syntax such as the following:
string must equal ("hi") ^ |
def
|
must
(includeWord : IncludeWord) : ResultOfIncludeWordForString
This method enables syntax such as the following:
string must include regex ("hi") ^ |
def
|
must
(endWithWord : EndWithWord) : ResultOfEndWithWordForString
This method enables syntax such as the following:
string must endWith regex ("world") ^ |
def
|
must
(notWord : NotWord) : ResultOfNotWordForString
This method enables syntax such as the following:
string must not have length (3) ^ |
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.1
|
|