org.codehaus.waffle.mock
Class AbstractRegistrarMockery

java.lang.Object
  extended by org.jmock.Mockery
      extended by org.codehaus.waffle.mock.AbstractRegistrarMockery
Direct Known Subclasses:
PicoRegistrarMockery

public abstract class AbstractRegistrarMockery
extends org.jmock.Mockery

Abstract jMock 2.x Mockery for asserting Registrars are defined correctly. Concrete subclasses need to define method to create the ContextContainer and the Registrar.

Author:
Michael Ward, Mauro Talevi

Constructor Summary
AbstractRegistrarMockery()
           
 
Method Summary
 void assertApplicationContext(java.lang.Class<?> registrarClass)
           
 void assertConfiguration(java.lang.Class<?> registrarClass)
           
 void assertRequestContext(java.lang.Class<?> customRegistrarClass)
           
 void assertSessionContext(java.lang.Class<?> registrarClass)
           
protected abstract  org.codehaus.waffle.context.ContextContainer createContextContainer()
           
protected abstract  org.codehaus.waffle.registrar.Registrar createRegistrar(org.codehaus.waffle.context.ContextContainer container)
           
protected  org.codehaus.waffle.monitor.RegistrarMonitor getRegistrarMonitor(org.codehaus.waffle.context.ContextContainer container)
           
 javax.servlet.http.HttpServletRequest mockHttpServletRequest()
           
 javax.servlet.http.HttpServletResponse mockHttpServletResponse()
           
 javax.servlet.http.HttpSession mockHttpSession()
           
 javax.servlet.ServletContext mockServletContext()
           
 
Methods inherited from class org.jmock.Mockery
addExpectation, assertIsSatisfied, checking, mock, mock, sequence, setDefaultResultForType, setExpectationErrorTranslator, setImposteriser, setNamingScheme, states
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRegistrarMockery

public AbstractRegistrarMockery()
Method Detail

mockServletContext

public javax.servlet.ServletContext mockServletContext()

mockHttpSession

public javax.servlet.http.HttpSession mockHttpSession()

mockHttpServletRequest

public javax.servlet.http.HttpServletRequest mockHttpServletRequest()

mockHttpServletResponse

public javax.servlet.http.HttpServletResponse mockHttpServletResponse()

assertConfiguration

public void assertConfiguration(java.lang.Class<?> registrarClass)

assertApplicationContext

public void assertApplicationContext(java.lang.Class<?> registrarClass)

assertSessionContext

public void assertSessionContext(java.lang.Class<?> registrarClass)

assertRequestContext

public void assertRequestContext(java.lang.Class<?> customRegistrarClass)

createContextContainer

protected abstract org.codehaus.waffle.context.ContextContainer createContextContainer()

createRegistrar

protected abstract org.codehaus.waffle.registrar.Registrar createRegistrar(org.codehaus.waffle.context.ContextContainer container)

getRegistrarMonitor

protected org.codehaus.waffle.monitor.RegistrarMonitor getRegistrarMonitor(org.codehaus.waffle.context.ContextContainer container)


Copyright © 2008. All Rights Reserved.