org.specs.runner.JUnit3

class JUnit3

class JUnit3(val specifications : Specification*)

 extends JUnit


Concrete class providing specifications to be used as a JUnitSuite
deprecated
- use JUnit4 instead as the JUnitSuite class runs with a JUnit4 runner


Source: JUnit.scala(90)

 Constructors

def this(specifications : Specification*)

 Fields

Debug val Debug Int Log
Error val Error Int Log
Info val Info Int Log
Warning val Warning Int Log
args var args
optional arguments to be used in the main method and which can be set from the code directly
Array[String] Reporter
failedAndErrorsOnly protected var failedAndErrorsOnly
this variable controls if ok examples should be printed
Boolean Reporter
getName def getName
[details]
return
- the name of the embedded suite
String JUnitSuite
level var level Int Log
reportSpecs def reportSpecs
report the list of specifications held by the object mixing this trait
Reporter Reporter
specs val specs Seq[Specification]
stacktrace protected var stacktrace
this variable controls if stacktraces should be printed
Boolean Reporter
suites def suites
[details]
return
- the test suites of the embedded suite
List[Test] JUnitSuite
testCases def testCases
[details]
return
- the test cases of the embedded suite
List[Test] JUnitSuite
testSuite val testSuite
embedded JUnit3 TestSuite object
TestSuite JUnitSuite
tests def tests
[details]
return
- the tests of the embedded suite (suites and test cases)
List[Test] JUnitSuite

 Methods

!= final def !=(arg0 : Any) Boolean Any
!= final def !=(arg0 : Object) Boolean AnyRef
:: def ::(r : Reporter) List[Reporter] Reporter
== final def ==(arg0 : Object) Boolean AnyRef
== final def ==(arg0 : Any) Boolean Any
addTest def addTest(t : Test)
add a new test to the embedded suite
Unit JUnitSuite
asInstanceOf final def asInstanceOf[T0] T0 Any
clone protected def clone Object AnyRef
countTestCases def countTestCases
[details]
return
- the number of tests of the embedded suite (suites and test cases)
Int JUnitSuite
debug def debug(msg : => String)
prints the message if the log level is Debug
Unit Log
eq final def eq(arg0 : Object) Boolean AnyRef
equals def equals(arg0 : Any) Boolean AnyRef
error def error(msg : => String)
prints the message if the log level is <= Error
Unit Log
finalize protected def finalize Unit AnyRef
flush override def flush
flushes the content if necessary
Unit ConsoleOutput
getClass final def getClass Class[Object] AnyRef
hashCode def hashCode Int AnyRef
info def info(msg : => String)
prints the message if the log level is <= Info
Unit Log
init def init
the init method is called before any "getter" method is called [details]
Then it initializes the object if it hasn't been done before
Unit JUnitSuite
initialize def initialize
the initialize method should be provided to build the testSuite object by adding nested suites and test cases
Unit JUnit
isInstanceOf final def isInstanceOf[T0] Boolean Any
main def main(arguments : Array[String])
Main method for the Reporter trait [details]
It first agregates all arguments: passed to the class and passed from the command line. Then it calls the reportSpecs method and exit the System with the appropriate error code, depending on the specification success or not.
Unit Reporter
ne final def ne(arg0 : Object) Boolean AnyRef
notify final def notify Unit AnyRef
notifyAll final def notifyAll Unit AnyRef
printStackTrace def printStackTrace(t : Throwable)
prints stacktraces
Unit Output
printf def printf(format : String, args : Any*)
prints several objects according to a format string (see Console [details]
printf)
Unit ConsoleOutput
println def println(m : Any)
prints an object with a newline
Unit ConsoleOutput
report def report(specs : Seq[Specification])
report specifications [details]
This method should usually be overriden by subclasses to provide concrete reporting behavior. Subclasses must not forget to insert a super.report call at the beginning of their processing to allow the chaining of several reporters as traits.
Reporter Reporter
resetOptions def resetOptions
reset all options
Reporter Reporter
run def run(result : TestResult)
run the embedded suite
Unit JUnitSuite
setFailedAndErrorsOnly def setFailedAndErrorsOnly
allow subclasses to remove the ok and skipped examples
Reporter Reporter
setName def setName(n : String)
set the name of the embedded suite
Unit JUnitSuite
setNoStacktrace def setNoStacktrace
allow subclasses to remove the stacktrace display
Reporter Reporter
synchronized final def synchronized[T0](arg0 : T0) T0 AnyRef
toString def toString String AnyRef
wait final def wait(arg0 : Long) Unit AnyRef
wait final def wait Unit AnyRef
wait final def wait(arg0 : Long, arg1 : Int) Unit AnyRef
warning def warning(msg : => String)
prints the message if the log level is <= Warning
Unit Log
Copyright (c) 2007-2009. All Rights Reserved.