|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.framework.TestCase
org.jmock.core.VerifyingTestCase
org.jmock.core.MockObjectSupportTestCase
org.jmock.MockObjectTestCase
org.jmock.cglib.MockObjectTestCase
org.apache.shale.test.jmock.AbstractJmockJsfTestCase
public abstract class AbstractJmockJsfTestCase
Abstract JMock test case base class, which sets up the JavaServer Faces
mock object environment for a particular simulated request. The following
protected variables are initialized in the setUp()
method, and
cleaned up in the tearDown()
method:
application
(MockApplication
)config
(MockServletConfig
)externalContext
(MockExternalContext
)facesContext
(MockFacesContext
)lifecycle
(MockLifecycle
)request
(MockHttpServletRequest
response
(MockHttpServletResponse
)servletContext
(MockServletContext
)session
(MockHttpSession
)In addition, appropriate factory classes will have been registered with
javax.faces.FactoryFinder
for Application
and
RenderKit
instances. The created FacesContext
instance will also have been registered in the apppriate thread local
variable, to simulate what a servlet container would do.
WARNING - If you choose to subclass this class, be sure
your setUp()
and tearDown()
methods call
super.setUp()
and super.tearDown()
respectively,
and that you implement your own suite()
method that exposes
the test methods for your test case.
Field Summary | |
---|---|
protected MockApplication |
application
|
protected MockServletConfig |
config
|
protected MockExternalContext |
externalContext
|
protected MockFacesContext |
facesContext
|
protected MockFacesContextFactory |
facesContextFactory
|
protected MockLifecycle |
lifecycle
|
protected MockLifecycleFactory |
lifecycleFactory
|
protected MockRenderKit |
renderKit
|
protected MockHttpServletRequest |
request
|
protected MockHttpServletResponse |
response
|
protected MockServletContext |
servletContext
|
protected MockHttpSession |
session
|
Fields inherited from class org.jmock.core.MockObjectSupportTestCase |
---|
ANYTHING, NOT_NULL, NULL |
Constructor Summary | |
---|---|
AbstractJmockJsfTestCase(java.lang.String name)
|
Method Summary | |
---|---|
protected void |
setUp()
|
protected void |
tearDown()
|
Methods inherited from class org.jmock.cglib.MockObjectTestCase |
---|
mock, mock, newCoreMock, newCoreMock |
Methods inherited from class org.jmock.MockObjectTestCase |
---|
atLeastOnce, atMostOnce, defaultMockNameForType, doAll, doAll, doAll, doAll, exactly, mock, mock, never, never, newDummy, newDummy, newDummy, once, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, returnIterator, returnIterator, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, throwException |
Methods inherited from class org.jmock.core.MockObjectSupportTestCase |
---|
and, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, arrayContaining, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, assertThat, collectionContaining, collectionContaining, compatibleType, contains, endsWith, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, hasProperty, hasProperty, isA, isIn, isIn, mapContaining, mapContaining, mapWithKey, mapWithKey, mapWithValue, mapWithValue, not, or, same, startsWith, stringContains, toString |
Methods inherited from class org.jmock.core.VerifyingTestCase |
---|
registerToVerify, runBare, unregisterToVerify, verify |
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runTest, setName, toString |
Methods inherited from class junit.framework.Assert |
---|
assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertEquals, assertFalse, assertFalse, assertNotNull, assertNotNull, assertNotSame, assertNotSame, assertNull, assertNull, assertSame, assertSame, assertTrue, assertTrue, fail, fail, failNotEquals, failNotSame, failSame, format |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected MockApplication application
protected MockServletConfig config
protected MockExternalContext externalContext
protected MockFacesContext facesContext
protected MockFacesContextFactory facesContextFactory
protected MockLifecycle lifecycle
protected MockLifecycleFactory lifecycleFactory
protected MockRenderKit renderKit
protected MockHttpServletRequest request
protected MockHttpServletResponse response
protected MockServletContext servletContext
protected MockHttpSession session
Constructor Detail |
---|
public AbstractJmockJsfTestCase(java.lang.String name)
Method Detail |
---|
protected void setUp() throws java.lang.Exception
setUp
in class junit.framework.TestCase
java.lang.Exception
protected void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |