org.specs.mock

trait JMockerExampleLifeCycle

[source: org/specs/mock/JMockerExampleLifeCycle.scala]

trait JMockerExampleLifeCycle
extends ExampleLifeCycle with JMockerContext
This trait defines when a jMock context will be created and expectations checked. The context and expectations are always created at the beginning of an Example, then checked just after the test has been executed. Executing a test can also trigger an ExpectationError (from the jMock library). This error will be transformed into a FailureException
Direct Known Subclasses:
JMocker

Values and Variables inherited from JMockerContext
context, expectations
Values and Variables inherited from ExampleLifeCycle
sequential, example
Method Summary
override def afterTest (ex : Example) : Unit
After a test the context is verified. If some more expectations are not met an ExpectationError is thrown In that case, it is transformed to a failure exception
override def beforeExample (ex : Example) : Unit
before any example, a new context and new expetcations should be created
override def executeTest (ex : Example, t : => Any) : Any
An expectation error may be thrown during the execution of a test In that case, it is transformed to a failure exception
Methods inherited from JMockerContext
restart, checkContext
Methods inherited from Imposterizer
createMockery
Methods inherited from ExampleLifeCycle
isSequential, setSequential, beforeTest, afterExample
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Method Details
override def beforeExample(ex : Example) : Unit
before any example, a new context and new expetcations should be created
Overrides
ExampleLifeCycle.beforeExample

override def executeTest(ex : Example, t : => Any) : Any
An expectation error may be thrown during the execution of a test In that case, it is transformed to a failure exception
Overrides
ExampleLifeCycle.executeTest

override def afterTest(ex : Example) : Unit
After a test the context is verified. If some more expectations are not met an ExpectationError is thrown In that case, it is transformed to a failure exception
Overrides
ExampleLifeCycle.afterTest


Copyright (c) 2007-2008. All Rights Reserved.