org.scalatest.matchers.ShouldMatchers

class StringShouldWrapper

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

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

Author
Bill Venners
Method Summary
def should (haveWord : HaveWord) : ResultOfHaveWordForString
This method enables syntax such as the following:
     string should have length (3)
            ^
     
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 (endWithWord : EndWithWord) : ResultOfEndWithWordForString
This method enables syntax such as the following:
     string should endWith regex ("world")
            ^
     
def should (includeWord : IncludeWord) : ResultOfIncludeWordForString
This method enables syntax such as the following:
     string should include regex ("hi")
            ^
     
def should (fullyMatchWord : FullyMatchWord) : ResultOfFullyMatchWordForString
This method enables syntax such as the following:
     string should fullyMatch regex ("""(-)?(\d+)(\.\d*)?""")
            ^
     
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 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
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
            ^
     

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(startWithWord : StartWithWord) : ResultOfStartWithWordForString
This method enables syntax such as the following:
     string should startWith regex ("hello")
            ^
     

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

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

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


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