ScalaTest 1.1
|
|
final
class
SizeShouldWrapper[A <: AnyRef](left : A, implicit
view$2 : (A) => SizeWrapper)
extends
AnyRefShouldMatchers
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 AnyRef
objects that can be implicitly converted to type SizeWrapper
.
Trait ShouldMatchers
includes implicit conversions from several types, including many structural types, to SizeWrapper
.
Method Summary | |
def
|
should
(haveWord : HaveWord) : ResultOfHaveWordForSizeWrapper[A]
This method enables syntax such as the following:
object should have size (3) ^ |
def
|
should
(notWord : NotWord) : ResultOfNotWordForSizeWrapper[A]
This method enables syntax such as the following:
object should not have size (3) ^ |
def
|
should
(beWord : BeWord) : ResultOfBeWordForAnyRef[A]
This method enables syntax such as the following:
object should be theSameInstanceAs anotherObject ^ |
def
|
should
(rightMatcher : Matcher[A]) : Unit
This method enables syntax such as the following:
objectWithSize should equal (3) ^ |
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 |
objectWithSize should equal (3) ^
def
should(notWord : NotWord) : ResultOfNotWordForSizeWrapper[A]
object should not have size (3) ^
def
should(haveWord : HaveWord) : ResultOfHaveWordForSizeWrapper[A]
object should have size (3) ^
def
should(beWord : BeWord) : ResultOfBeWordForAnyRef[A]
object should be theSameInstanceAs anotherObject ^
ScalaTest 1.1
|
|