org.specs.runner.TestDescription

trait TestDescription

trait TestDescription

 extends Classes


Common methods to create descriptions from a test or a test suite. If the test is executed from Maven, its description can be simplified and not include the test hashcode.


Source: JUnitSuiteRunner.scala(57)

Direct Known Subclasses

JUnitSuiteRunner, OldTestClassAdaptingListener,

 Fields

isExecutedFromMaven lazy val isExecutedFromMaven Boolean

 Methods

!= final def !=(arg0 : Any) Boolean Any
!= final def !=(arg0 : Object) Boolean AnyRef
== final def ==(arg0 : Object) Boolean AnyRef
== final def ==(arg0 : Any) Boolean Any
asDescription def asDescription(ts : JUnitSuite)
[details]
return
- the description of the suite based on its name
Description
asDescription def asDescription(test : Test)
Describe a test including its hashCode instead of its class name [details]
If the class name is included, some tests may not render properly as there can only be one test with a given in a given class. For specs it is different as there can be the same name in 2 different systems (and those systems will be represented by the same JUnit class: ExampleTestCase). This uses the createSuiteDescription method from JUnit as it is the only way to create a Description object having the required name.
return
- the description of the test with a name including its hashcode
Description
asInstanceOf final def asInstanceOf[T0] T0 Any
clone protected def clone Object AnyRef
eq final def eq(arg0 : Object) Boolean AnyRef
equals def equals(arg0 : Any) Boolean AnyRef
finalize protected def finalize Unit AnyRef
getClass final def getClass Class[Object] AnyRef
hashCode def hashCode Int AnyRef
isExecutedFrom def isExecutedFrom(name : String)
This method is used to determine for example if the JUnit runner is executed from Maven or within Eclipse [details]
In the first the test case names don't need to have the hashcode example.
return
- true if the this current piece of code contains name in its stacktrace.
Boolean Classes
isInstanceOf final def isInstanceOf[T0] Boolean Any
makeDescription def makeDescription(test : Test)
create a Description from a TestCase or a JUnitSuite object
Description
ne final def ne(arg0 : Object) Boolean AnyRef
notify final def notify Unit AnyRef
notifyAll final def notifyAll Unit AnyRef
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
Copyright (c) 2007-2009. All Rights Reserved.