| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |
case class Example(val description : String, val cycle : ExampleLifeCycle)
extends
Product
Example class specifies one example of a system behaviourExampleLifeCycle which defines behaviour before/after example and test
Usage: "this is an example" in { // code containing assertions } or
"this is an example" >> { // code containing assertions }
">>" can be used instead of "in" if that word makes no sense in the specification
An example can also contain subexamples which are executed will evaluating the in method.
When assertions have been evaluated inside an example they register their failures and errors for later reporting
def this(description : String, cycle : ExampleLifeCycle)
|
| addAssertion |
def addAssertion
increment the number of assertions in this example
|
Example | |
| assertionsNb |
def assertionsNb
[details]
|
Int | |
| errors |
def errors
[details]
|
Seq[Throwable] | |
| failures |
def failures
[details]
|
Seq[FailureException] | |
| productArity |
override def productArity
|
Int | |
| productPrefix |
override def productPrefix
|
String | |
| skipped |
def skipped
[details]
|
Seq[SkippedException] | |
| subExamples |
def subExamples
[details]
|
Queue[Example] | |
| thisErrors |
var thisErrors
errors created by Assert objects inside the
in |
Queue[Throwable] | |
| thisFailures |
var thisFailures
failures created by Assert objects inside the
in |
Queue[FailureException] | |
| thisSkipped |
var thisSkipped
skipped created by Assert objects inside the
in |
Queue[SkippedException] |
| != |
final def !=(arg0 : Any)
|
Boolean | Any |
| != |
final def !=(arg0 : Object)
|
Boolean | AnyRef |
| == |
final def ==(arg0 : Object)
|
Boolean | AnyRef |
| == |
final def ==(arg0 : Any)
|
Boolean | Any |
| >> |
def >>(test : => Any)
alias for the
in method
|
Example | |
| addError |
def addError(t : Throwable)
creates and adds a new error from an exception t
|
Unit | |
| addExample |
def addExample(e : Example)
add a new sub-example to this example
|
Unit | |
| addFailure |
def addFailure(failure : FailureException)
creates and adds a failure exception
|
Unit | |
| addSkipped |
def addSkipped(skip : SkippedException)
creates and adds a skipped exception
|
Unit | |
| asInstanceOf |
final def asInstanceOf[T0]
|
T0 | Any |
| clone |
protected def clone
|
Object | AnyRef |
| eq |
final def eq(arg0 : Object)
|
Boolean | AnyRef |
| equals |
override def equals(arg0 : Any)
|
Boolean | |
| finalize |
protected def finalize
|
Unit | AnyRef |
| getClass |
final def getClass
|
Class[Object] | AnyRef |
| hashCode |
override def hashCode
|
Int | |
| in |
def in(test : => Any)
creates a new Example object and store as a function the test to be executed
[details]
This
test
is a value which may contain assertions. Upon execution, errors and failures will be attached to the current example
by calling the addFailure and addError methods
Execution will be triggered when requesting status information on that example: failures, errors, assertions number, subexamples
|
Example | |
| isInstanceOf |
final def isInstanceOf[T0]
|
Boolean | Any |
| ne |
final def ne(arg0 : Object)
|
Boolean | AnyRef |
| notify |
final def notify
|
Unit | AnyRef |
| notifyAll |
final def notifyAll
|
Unit | AnyRef |
| pretty |
def pretty(tab : String)
[details]
|
String | |
| productElement |
override def productElement(arg0 : Int)
|
Any | |
| synchronized |
final def synchronized[T0](arg0 : T0)
|
T0 | AnyRef |
| toString |
override def toString
[details]
|
String | |
| wait |
final def wait(arg0 : Long)
|
Unit | AnyRef |
| wait |
final def wait
|
Unit | AnyRef |
| wait |
final def wait(arg0 : Long, arg1 : Int)
|
Unit | AnyRef |
| OVERVIEW | PACKAGE | CONSTR | FIELDS | METHODS | FRAMES NO FRAMES | INHERITED |