ScalaTest 1.0
|
|
final
class
StringShouldWrapper(left : java.lang.String)
extends
StringShouldWrapperForVerbShouldMatchers
or MustMatchers
for an overview of
the matchers DSL.
This class is used in conjunction with an implicit conversion to enable should
methods to
be invoked on String
s.
Method Summary | |
def
|
should
(rightMatcher : Matcher[java.lang.String]) : Unit
This method enables syntax such as the following:
string should equal ("hi") ^ |
def
|
should
(endWithWord : EndWithWord) : ResultOfEndWithWordForString
This method enables syntax such as the following:
string should endWith regex ("world") ^ |
def
|
should
(haveWord : HaveWord) : ResultOfHaveWordForString
This method enables syntax such as the following:
string should have length (3) ^ |
def
|
should
(fullyMatchWord : FullyMatchWord) : ResultOfFullyMatchWordForString
This method enables syntax such as the following:
string should fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^ |
def
|
should
(includeWord : IncludeWord) : ResultOfIncludeWordForString
This method enables syntax such as the following:
string should include regex ("hi") ^ |
def
|
should
(beWord : BeWord) : ResultOfBeWordForAnyRef[java.lang.String]
This method enables syntax such as the following:
string should be theSameInstanceAs anotherObject ^ |
def
|
should
(startWithWord : StartWithWord) : ResultOfStartWithWordForString
This method enables syntax such as the following:
string should startWith regex ("hello") ^ |
def
|
should
(notWord : NotWord) : ResultOfNotWordForString
This method enables syntax such as the following:
string should not have length (3) ^ |
Methods inherited from StringShouldWrapperForVerb | |
should, should, should, should |
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
should(rightMatcher : Matcher[java.lang.String]) : Unit
string should equal ("hi") ^
def
should(beWord : BeWord) : ResultOfBeWordForAnyRef[java.lang.String]
string should be theSameInstanceAs anotherObject ^
def
should(haveWord : HaveWord) : ResultOfHaveWordForString
string should have length (3) ^
def
should(includeWord : IncludeWord) : ResultOfIncludeWordForString
string should include regex ("hi") ^
def
should(startWithWord : StartWithWord) : ResultOfStartWithWordForString
string should startWith regex ("hello") ^
def
should(endWithWord : EndWithWord) : ResultOfEndWithWordForString
string should endWith regex ("world") ^
def
should(fullyMatchWord : FullyMatchWord) : ResultOfFullyMatchWordForString
string should fullyMatch regex ("""(-)?(\d+)(\.\d*)?""") ^
def
should(notWord : NotWord) : ResultOfNotWordForString
string should not have length (3) ^
ScalaTest 1.0
|
|