ScalaTest 0.9.5
|
|
class
StringShouldWrapper(left : java.lang.String)
extends
AnyRefShouldMatchers
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
(haveWord : HaveWord) : ResultOfHaveWordForString
This method enables syntax such as the following:
string should have length (3) ^ |
def
|
should
(includeWord : IncludeWord) : ResultOfIncludeWordForString
This method enables syntax such as the following:
string should include regex ("hi") ^ |
def
|
should
(endWithWord : EndWithWord) : ResultOfEndWithWordForString
This method enables syntax such as the following:
string should endWith regex ("world") ^ |
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) ^ |
def
|
should
(fullyMatchWord : FullyMatchWord) : ResultOfFullyMatchWordForString
This method enables syntax such as the following:
string should ^ |
def
|
should
(rightMatcher : Matcher[java.lang.String]) : Unit
This method enables syntax such as the following:
string should equal ("hi") ^ |
def
|
should
(beWord : BeWord) : ResultOfBeWordForAnyRef[java.lang.String]
This method enables syntax such as the following:
string should be theSameInstanceAs anotherObject ^ |
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 ^
def
should(notWord : NotWord) : ResultOfNotWordForString
string should not have length (3) ^
ScalaTest 0.9.5
|
|