org.scalatest.matchers.Matchers

class IncludeWord

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

final class IncludeWord
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 (expectedSubstring : java.lang.String) : Matcher[java.lang.String]
This method enables the following syntax:
     "1.7" should (include ("1.7") and include ("1.8"))
                           ^
     
def regex [T <: java.lang.String](right : T) : Matcher[T]
This method enables the following syntax:
     val decimal = """(-)?(\d+)(\.\d*)?"""
     "a1.7b" should (include regex (decimal) and include regex (decimal))
                             ^
     
def regex (expectedRegex : scala.util.matching.Regex) : Matcher[java.lang.String]
This method enables the following syntax:
     val decimalRegex = """(-)?(\d+)(\.\d*)?""".r
     "a1.7" should (include regex (decimalRegex) and include regex (decimalRegex))
                            ^
     
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(expectedSubstring : java.lang.String) : Matcher[java.lang.String]
This method enables the following syntax:
     "1.7" should (include ("1.7") and include ("1.8"))
                           ^
     

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

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


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