org.specs.mock

trait JMockerContext

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

trait JMockerContext
extends Imposterizer
This trait contains the jMock Mockery object and current expectations
Direct Known Subclasses:
JMockerExampleLifeCycle

Value Summary
var context : org.jmock.Mockery
the context holds the mocks, the expectations so is able to get the calls and check them
var expectations : org.jmock.Expectations
call expectations with optional constraints on the number of calls, on parameters, return values,...
Method Summary
def checkContext : Unit
This method can be used to check the context. It will always restart the context, even if there is an ExpectationError In that case, it is transformed to a failure exception
def restart : Unit
creates a new context and a new Expectations object
Methods inherited from Imposterizer
createMockery
Methods inherited from AnyRef
getClass, hashCode, equals, clone, toString, notify, notifyAll, wait, wait, wait, finalize, ==, !=, eq, ne, synchronized
Methods inherited from Any
==, !=, isInstanceOf, asInstanceOf
Value Details
var context : org.jmock.Mockery
the context holds the mocks, the expectations so is able to get the calls and check them

var expectations : org.jmock.Expectations
call expectations with optional constraints on the number of calls, on parameters, return values,...

Method Details
def restart : Unit
creates a new context and a new Expectations object

def checkContext : Unit
This method can be used to check the context. It will always restart the context, even if there is an ExpectationError In that case, it is transformed to a failure exception


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