|
ScalaTest 1.0
|
|
org/scalatest/matchers/Matchers.scala]
final
class
HaveWord
extends AnyRefShouldMatchers or MustMatchers for an overview of
the matchers DSL.| Method Summary | |
def
|
apply
[T](firstPropertyMatcher : HavePropertyMatcher[T, Any], propertyMatchers : HavePropertyMatcher[T, Any]*) : Matcher[T]
This method enables the following syntax:
book should have (title ("A Tale of Two Cities"))
^
|
def
|
length
(expectedLength : Long) : Matcher[AnyRef]
This method enables the following syntax:
book should have length (9)
^
|
def
|
size
(expectedSize : Long) : Matcher[AnyRef]
This method enables the following syntax:
book should have size (9)
^
|
| 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 |
book should have length (9)
^
Currently (as of ScalaTest 0.9.5), this method will produce a Matcher[AnyRef], and if the
AnyRef passed to that matcher's apply method does not have the appropriate length property
structure, all will compile but a TestFailedException will result at runtime explaining the problem. The one exception is that it will work on
java.util.List, even though that type has no length structure (its size property
will be used instead.) In a future ScalaTest release, this may be tightened so that all is statically checked at compile time.
book should have size (9)
^
Currently (as of ScalaTest 0.9.5), this method will produce a Matcher[AnyRef], and if the
AnyRef passed to that matcher's apply method does not have the appropriate size property
structure, all will compile but a TestFailedException will result at runtime explaining the problem.
In a future ScalaTest release, this may be tightened so that all is statically checked at compile time.
def
apply[T](firstPropertyMatcher : HavePropertyMatcher[T, Any], propertyMatchers : HavePropertyMatcher[T, Any]*) : Matcher[T]
book should have (title ("A Tale of Two Cities"))
^
|
ScalaTest 1.0
|
|