org.scalatest.junit

object ShouldMatchersForJUnit

[source: org/scalatest/junit/ShouldMatchersForJUnit.scala]

object ShouldMatchersForJUnit
extends ShouldMatchersForJUnit
Companion object that facilitates the importing of ShouldMatchersForJUnit members as an alternative to mixing it in. One use case is to import ShouldMatchersForJUnit members so you can use them in the Scala interpreter:
 Macintosh-65:delus bv$ scala -cp .:../target/jar_contents:junit3.8.2/junit.jar
 Welcome to Scala version 2.7.5.final (Java HotSpot(TM) Client VM, Java 1.5.0_16).
 Type in expressions to have them evaluated.
 Type :help for more information.
 
 scala> import org.scalatest.junit.ShouldMatchersForJUnit._
 import org.scalatest.junit.ShouldMatchersForJUnit._
 
 scala> "hi" should have length (3)
 junit.framework.AssertionFailedError: "hi" did not have length 3
 	at org.scalatest.junit.ShouldMatchersForJUnit$class.newTestFailedException(ShouldMatchersForJUnit.scala:22)
 	at org.scalatest.junit.ShouldMatchersForJUnit$.newTestFailedException(ShouldMatchersForJUnit.scala:63)
 	at org.scalatest.matchers.Matchers$ResultOfHaveWordForString.length(Matchers.scala:4102)
 	at .( 1 should equal (2)
 junit.framework.AssertionFailedError: 1 did not equal 2
 	at org.scalatest.junit.ShouldMatchersForJUnit$class.newTestFailedException(ShouldMatchersForJUnit.scala:22)
 	at org.scalatest.junit.ShouldMatchersForJUnit$.newTestFailedException(ShouldMatchersForJUnit.scala:63)
 	at org.scalatest.matchers.ShouldMatchers$ShouldMethodHelper$.shouldMatcher(ShouldMatchers.scala:800)
 	at org.scal...
 scala> "hello, world" should startWith ("hello")
 
 scala> 7 should (be >= (3) and not be <= (7))
 junit.framework.AssertionFailedError: 7 was greater than or equal to 3, but 7 was less than or equal to 7
 	at org.scalatest.junit.ShouldMatchersForJUnit$class.newTestFailedException(ShouldMatchersForJUnit.scala:22)
 	at org.scalatest.junit.ShouldMatchersForJUnit$.newTestFailedException(ShouldMatchersForJUnit.scala:63)
 	at org.scalatest.matchers.ShouldMatchers$ShouldMethodHelper$.sh...
 
Author
Bill Venners
Values and Variables inherited from Matchers
not, be, have, contain, include, fullyMatch, startWith, endWith, length, size, key, value, a, an, theSameInstanceAs, regex
Methods inherited from ShouldMatchers
convertToEvaluatingApplicationShouldWrapper, convertToAnyShouldWrapper, convertToDoubleShouldWrapper, convertToFloatShouldWrapper, convertToLongShouldWrapper, convertToIntShouldWrapper, convertToShortShouldWrapper, convertToByteShouldWrapper, convertToAnyRefShouldWrapper, convertToCollectionShouldWrapper, convertToSeqShouldWrapper, convertToArrayShouldWrapper, convertToListShouldWrapper, convertToMapShouldWrapper, convertToStringShouldWrapper, convertToJavaCollectionShouldWrapper, convertToJavaListShouldWrapper, convertToJavaMapShouldWrapper, convertHasIntGetLengthMethodToLengthShouldWrapper, convertHasIntGetLengthFieldToLengthShouldWrapper, convertHasIntLengthFieldToLengthShouldWrapper, convertHasIntLengthMethodToLengthShouldWrapper, convertHasLongGetLengthMethodToLengthShouldWrapper, convertHasLongGetLengthFieldToLengthShouldWrapper, convertHasLongLengthFieldToLengthShouldWrapper, convertHasLongLengthMethodToLengthShouldWrapper, convertHasIntGetSizeMethodToSizeShouldWrapper, convertHasIntGetSizeFieldToSizeShouldWrapper, convertHasIntSizeFieldToSizeShouldWrapper, convertHasIntSizeMethodToSizeShouldWrapper, convertHasLongGetSizeMethodToSizeShouldWrapper, convertHasLongGetSizeFieldToSizeShouldWrapper, convertHasLongSizeFieldToSizeShouldWrapper, convertHasLongSizeMethodToSizeShouldWrapper
Methods inherited from Matchers
convertToMatcherWrapper, convertIterableMatcherToJavaCollectionMatcher, convertMapMatcherToJavaMapMatcher, convertLengthFieldToIntLengthWrapper, convertLengthMethodToIntLengthWrapper, convertGetLengthFieldToIntLengthWrapper, convertGetLengthMethodToIntLengthWrapper, convertLengthFieldToLongLengthWrapper, convertLengthMethodToLongLengthWrapper, convertGetLengthFieldToLongLengthWrapper, convertGetLengthMethodToLongLengthWrapper, convertSizeFieldToIntSizeWrapper, convertSizeMethodToIntSizeWrapper, convertGetSizeFieldToIntSizeWrapper, convertGetSizeMethodToIntSizeWrapper, convertSizeFieldToLongSizeWrapper, convertSizeMethodToLongSizeWrapper, convertGetSizeFieldToLongSizeWrapper, convertGetSizeMethodToLongSizeWrapper, convertSymbolToHavePropertyMatcherGenerator, equal, convertDoubleToPlusOrMinusWrapper, convertFloatToPlusOrMinusWrapper, convertLongToPlusOrMinusWrapper, convertIntToPlusOrMinusWrapper, convertShortToPlusOrMinusWrapper, convertByteToPlusOrMinusWrapper, <, >, <=, >=, ===, evaluating, produce
Methods inherited from Assertions
assert, assert, assert, assert, convertToEqualizer, intercept, expect, expect, fail, fail, fail, fail
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf

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