in scala.testing
object SUnit

`object` SUnit
  `extends` java.lang.Object
  `with` scala.ScalaObject

  Unit testing methods in the spirit of JUnit framework.

  Use these classes like this:

       import scala.testing.SUnit
       import SUnit._

       class MyTest(n: String) extends TestCase(n) {

         override def runTest() = n match {
           case "myTest1" => assertTrue(true)
           case "myTest2" => assertTrue("hello", false)
         }
       }

       val r = new TestResult()
       suite.run(r)
       for (val tf <- r.failures()) {
         Console.println(tf.toString())
       }

Class Summary
`case` | `class` AssertFailed an AssertFailed is thrown for a failed assertion
| `class` TestCase The class `TestCase` defines the fixture to run multiple tests.
| `class` TestFailure The class `TestFailure` collects a failed test together with the thrown exception.
| `class` TestResult a TestResult collects the result of executing a test case
| `class` TestSuite The class `TestSuite` runs a composite of test cases.

Trait Summary
`abstract` | `trait` Assert this class defined useful assert methods
`abstract` | `trait` Test a Test can be run with its result being collected

Constructor Summary
| `def` this

Trait Detail

`abstract trait` Assert
  `extends` java.lang.Object
  `with` scala.ScalaObject

  this class defined useful assert methods

Direct Known Subclasses:
  TestCase

Def Summary
| `def` assertEquals [A] (expected: A, actual: => A) : scala.Unit equality
| `def` assertEquals [A] (msg: java.lang.String, expected: A, actual: => A) : scala.Unit equality
| `def` assertFalse (actual: => scala.Boolean) : scala.Unit falseness
| `def` assertFalse (msg: java.lang.String, actual: => scala.Boolean) : scala.Unit falseness
| `def` assertNotNull (actual: => java.lang.Object) : scala.Unit not null
| `def` assertNotNull (msg: java.lang.String, actual: => java.lang.Object) : scala.Unit not null
| `def` assertNotSame (expected: => java.lang.Object, actual: => java.lang.Object) : scala.Unit reference inequality
| `def` assertNotSame (msg: java.lang.String, expected: => java.lang.Object, actual: => java.lang.Object) : scala.Unit reference inequality
| `def` assertNull (actual: => java.lang.Object) : scala.Unit null
| `def` assertNull (msg: java.lang.String, actual: => java.lang.Object) : scala.Unit null
| `def` assertSame (expected: => java.lang.Object, actual: => java.lang.Object) : scala.Unit reference equality
| `def` assertSame (msg: java.lang.String, expected: => java.lang.Object, actual: => java.lang.Object) : scala.Unit reference equality
| `def` assertTrue (actual: => scala.Boolean) : scala.Unit trueness
| `def` assertTrue (msg: java.lang.String, actual: => scala.Boolean) : scala.Unit trueness
| `def` fail (msg: java.lang.String) : scala.Unit throws `AssertFailed` with given message `msg`.

Def Detail

`def` assertEquals [A](expected: A, actual: => A): scala.Unit

  equality

`def` assertEquals [A](msg: java.lang.String, expected: A, actual: => A): scala.Unit

  equality

`def` assertFalse (actual: => scala.Boolean): scala.Unit

  falseness

`def` assertFalse (msg: java.lang.String, actual: => scala.Boolean): scala.Unit

  falseness

`def` assertNotNull (actual: => java.lang.Object): scala.Unit

  not null

`def` assertNotNull (msg: java.lang.String, actual: => java.lang.Object): scala.Unit

  not null

`def` assertNotSame (expected: => java.lang.Object, actual: => java.lang.Object): scala.Unit

  reference inequality

`def` assertNotSame (msg: java.lang.String, expected: => java.lang.Object, actual: => java.lang.Object): scala.Unit

  reference inequality

`def` assertNull (actual: => java.lang.Object): scala.Unit

  null

`def` assertNull (msg: java.lang.String, actual: => java.lang.Object): scala.Unit

  null

`def` assertSame (expected: => java.lang.Object, actual: => java.lang.Object): scala.Unit

  reference equality

`def` assertSame (msg: java.lang.String, expected: => java.lang.Object, actual: => java.lang.Object): scala.Unit

  reference equality

`def` assertTrue (actual: => scala.Boolean): scala.Unit

  trueness

`def` assertTrue (msg: java.lang.String, actual: => scala.Boolean): scala.Unit

  trueness

`def` fail (msg: java.lang.String): scala.Unit

  throws `AssertFailed` with given message `msg`.

`abstract trait` Test
  `extends` java.lang.Object
  `with` scala.ScalaObject

  a Test can be run with its result being collected

Direct Known Subclasses:
  TestCase, TestSuite

Def Summary
`abstract` | `def` run (r: SUnit.this.TestResult) : scala.Unit

Def Detail

`abstract def` run (r: SUnit.this.TestResult): scala.Unit

Constructor Detail

`def` this