org.scalatest.matchers.MustMatchers

class StringMustWrapper

[source: org/scalatest/matchers/MustMatchers.scala]

final class StringMustWrapper(left : java.lang.String)
extends StringMustWrapperForVerb
This class is part of the ScalaTest matchers DSL. Please see the documentation for MustMatchers 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 Strings.

Author
Bill Venners
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
This method enables syntax such as the following:
     string must equal ("hi")
            ^
     

def must(beWord : BeWord) : ResultOfBeWordForAnyRef[java.lang.String]
This method enables syntax such as the following:
     string must be theSameInstanceAs anotherObject
            ^
     

def must(haveWord : HaveWord) : ResultOfHaveWordForString
This method enables syntax such as the following:
     string must have length (3)
            ^
     

def must(includeWord : IncludeWord) : ResultOfIncludeWordForString
This method enables syntax such as the following:
     string must include regex ("hi")
            ^
     

def must(startWithWord : StartWithWord) : ResultOfStartWithWordForString
This method enables syntax such as the following:
     string must startWith regex ("hello")
            ^
     

def must(endWithWord : EndWithWord) : ResultOfEndWithWordForString
This method enables syntax such as the following:
     string must endWith regex ("world")
            ^
     

def must(fullyMatchWord : FullyMatchWord) : ResultOfFullyMatchWordForString
This method enables syntax such as the following:
     string must fullyMatch regex ("""(-)?(\d+)(\.\d*)?""")
            ^
     

def must(notWord : NotWord) : ResultOfNotWordForString
This method enables syntax such as the following:
     string must not have length (3)
            ^
     


Copyright (C) 2001-2009 Artima, Inc. All rights reserved.