Packages

object AssertionsForJUnit extends AssertionsForJUnit

Companion object that facilitates the importing of AssertionsForJUnit members as an alternative to mixing it in. One use case is to import AssertionsForJUnit members so you can use them in the Scala interpreter:

$ scala -cp junit3.8.2/junit.jar:../target/jar_contents
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.AssertionsForJUnit._
import org.scalatest.junit.AssertionsForJUnit._

scala> assert(1 === 2)
junit.framework.AssertionFailedError: 1 did not equal 2
	at org.scalatest.junit.AssertionsForJUnit$class.assert(AssertionsForJUnit.scala:353)
	at org.scalatest.junit.AssertionsForJUnit$.assert(AssertionsForJUnit.scala:672)
	at .(:7)
	at .()
	at RequestResult$.(:3)
	at RequestResult$.()
	at RequestResult$result( expect(3) { 1 + 3 }
junit.framework.AssertionFailedError: Expected 3, but got 4
	at org.scalatest.junit.AssertionsForJUnit$class.expect(AssertionsForJUnit.scala:563)
	at org.scalatest.junit.AssertionsForJUnit$.expect(AssertionsForJUnit.scala:672)
	at .(:7)
	at .()
	at RequestResult$.(:3)
	at RequestResult$.()
	at RequestResult$result( val caught = intercept[StringIndexOutOfBoundsException] { "hi".charAt(-1) }
caught: StringIndexOutOfBoundsException = java.lang.StringIndexOutOfBoundsException: String index out of range: -1

Linear Supertypes
AssertionsForJUnit, Assertions, TripleEquals, TripleEqualsSupport, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AssertionsForJUnit
  2. AssertionsForJUnit
  3. Assertions
  4. TripleEquals
  5. TripleEqualsSupport
  6. AnyRef
  7. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. class AssertionsHelper extends AnyRef

    Helper class used by code generated by the assert macro.

  2. class CheckingEqualizer[L] extends AnyRef
    Definition Classes
    TripleEqualsSupport
  3. class Equalizer[L] extends AnyRef
    Definition Classes
    TripleEqualsSupport

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. def !==[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
    Definition Classes
    TripleEqualsSupport
  3. def !==(right: Null): TripleEqualsInvocation[Null]
    Definition Classes
    TripleEqualsSupport
  4. def !==[T](right: T): TripleEqualsInvocation[T]
    Definition Classes
    TripleEqualsSupport
  5. final def ##(): Int
    Definition Classes
    AnyRef → Any
  6. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  7. def ===[T](right: Spread[T]): TripleEqualsInvocationOnSpread[T]
    Definition Classes
    TripleEqualsSupport
  8. def ===(right: Null): TripleEqualsInvocation[Null]
    Definition Classes
    TripleEqualsSupport
  9. def ===[T](right: T): TripleEqualsInvocation[T]
    Definition Classes
    TripleEqualsSupport
  10. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  11. macro def assert(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    AssertionsForJUnit → Assertions
  12. macro def assert(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    AssertionsForJUnit → Assertions
  13. macro def assertCompiles(code: String)(implicit pos: Position): Assertion
    Definition Classes
    Assertions
  14. macro def assertDoesNotCompile(code: String)(implicit pos: Position): Assertion
    Definition Classes
    Assertions
  15. def assertResult(expected: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  16. def assertResult(expected: Any, clue: Any)(actual: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    Assertions
  17. def assertThrows[T <: AnyRef](f: ⇒ Any)(implicit classTag: ClassTag[T], pos: Position): Assertion
    Definition Classes
    Assertions
  18. macro def assertTypeError(code: String)(implicit pos: Position): Assertion
    Definition Classes
    Assertions
  19. val assertionsHelper: AssertionsHelper

    Helper instance used by code generated by macro assertion.

  20. macro def assume(condition: Boolean, clue: Any)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    AssertionsForJUnit → Assertions
  21. macro def assume(condition: Boolean)(implicit prettifier: Prettifier, pos: Position): Assertion
    Definition Classes
    AssertionsForJUnit → Assertions
  22. def cancel(cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  23. def cancel(message: String, cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  24. def cancel(message: String)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  25. def cancel()(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  26. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  27. def convertEquivalenceToAToBConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: <:<[A, B]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  28. def convertEquivalenceToBToAConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: <:<[B, A]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  29. def convertToCheckingEqualizer[T](left: T): CheckingEqualizer[T]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  30. implicit def convertToEqualizer[T](left: T): Equalizer[T]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  31. def defaultEquality[A]: Equality[A]
    Definition Classes
    TripleEqualsSupport
  32. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  33. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  34. def fail(cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  35. def fail(message: String, cause: Throwable)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  36. def fail(message: String)(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  37. def fail()(implicit pos: Position): Nothing
    Definition Classes
    Assertions
  38. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  39. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  40. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  41. def intercept[T <: AnyRef](f: ⇒ Any)(implicit classTag: ClassTag[T], pos: Position): T
    Definition Classes
    Assertions
  42. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  43. def lowPriorityTypeCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], ev: <:<[A, B]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  44. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  45. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  46. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  47. def pending: Assertion with PendingStatement
    Definition Classes
    Assertions
  48. def pendingUntilFixed(f: ⇒ Unit)(implicit pos: Position): Assertion with PendingStatement
    Definition Classes
    Assertions
  49. final val succeed: Assertion
    Definition Classes
    Assertions
  50. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  51. def toExceptionFunction(message: Option[String]): (StackDepthException) ⇒ Option[String]

    If message or message contents are null, throw a null exception, otherwise create a function that returns the option.

    If message or message contents are null, throw a null exception, otherwise create a function that returns the option.

    Definition Classes
    AssertionsForJUnit
  52. def toString(): String
    Definition Classes
    AnyRef → Any
  53. def typeCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], ev: <:<[B, A]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  54. implicit def unconstrainedEquality[A, B](implicit equalityOfA: Equality[A]): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
  55. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  56. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  57. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  58. def withClue[T](clue: Any)(fun: ⇒ T): T
    Definition Classes
    Assertions

Deprecated Value Members

  1. def conversionCheckedConstraint[A, B](implicit equivalenceOfA: Equivalence[A], cnv: (B) ⇒ A): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The conversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  2. def convertEquivalenceToAToBConversionConstraint[A, B](equivalenceOfB: Equivalence[B])(implicit ev: (A) ⇒ B): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The convertEquivalenceToAToBConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  3. def convertEquivalenceToBToAConversionConstraint[A, B](equivalenceOfA: Equivalence[A])(implicit ev: (B) ⇒ A): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The convertEquivalenceToBToAConversionConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

  4. def lowPriorityConversionCheckedConstraint[A, B](implicit equivalenceOfB: Equivalence[B], cnv: (A) ⇒ B): CanEqual[A, B]
    Definition Classes
    TripleEquals → TripleEqualsSupport
    Annotations
    @deprecated
    Deprecated

    (Since version 3.1.0) The lowPriorityConversionCheckedConstraint method has been deprecated and will be removed in a future version of ScalaTest. It is no longer needed now that the deprecation period of ConversionCheckedTripleEquals has expired. It will not be replaced.

Inherited from AssertionsForJUnit

Inherited from Assertions

Inherited from TripleEquals

Inherited from TripleEqualsSupport

Inherited from AnyRef

Inherited from Any

Ungrouped