org.scalatest.matchers.Matchers

class EndWithWord

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

final class EndWithWord
extends AnyRef
This class is part of the ScalaTest matchers DSL. Please see the documentation for ShouldMatchers or MustMatchers for an overview of the matchers DSL.
Author
Bill Venners
Method Summary
def apply (right : java.lang.String) : Matcher[java.lang.String]
This method enables the following syntax:
     "1.7b" should (endWith ("1.7b") and endWith ("7b"))
                            ^
     
def regex (rightRegex : scala.util.matching.Regex) : Matcher[java.lang.String]
This method enables the following syntax:
     val decimalRegex = """(-)?(\d+)(\.\d*)?""".r
     "b1.7" should (endWith regex (decimalRegex) and endWith regex (decimalRegex))
                            ^
     
def regex [T <: java.lang.String](right : T) : Matcher[T]
This method enables the following syntax:
     val decimal = """(-)?(\d+)(\.\d*)?"""
     "b1.7" should (endWith regex (decimal) and endWith regex (decimal))
                            ^
     
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 apply(right : java.lang.String) : Matcher[java.lang.String]
This method enables the following syntax:
     "1.7b" should (endWith ("1.7b") and endWith ("7b"))
                            ^
     

def regex[T <: java.lang.String](right : T) : Matcher[T]
This method enables the following syntax:
     val decimal = """(-)?(\d+)(\.\d*)?"""
     "b1.7" should (endWith regex (decimal) and endWith regex (decimal))
                            ^
     

def regex(rightRegex : scala.util.matching.Regex) : Matcher[java.lang.String]
This method enables the following syntax:
     val decimalRegex = """(-)?(\d+)(\.\d*)?""".r
     "b1.7" should (endWith regex (decimalRegex) and endWith regex (decimalRegex))
                            ^
     


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