|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object junit.framework.Assert junit.framework.TestCase org.jmock.core.VerifyingTestCase org.jmock.core.MockObjectSupportTestCase org.jmock.MockObjectTestCase net.sf.oness.common.webapp.controller.testing.JMockStrutsTestCase
Base class for Struts testing that mocks Spring ApplicationContext and setups
the paths for struts-config.xml file.
By default sets the webapp
directory to the system property "maven.war.webapp.dir" and ConfigFile to
"WEB-INF/struts/struts-config.xml"
It also allows mock testing with jmock and StrutsTestCase at the same time. Struts operations are available with the struts() method so in the subclasses you can call for example
struts().setRequestPathInfo(..); struts().addRequestParameter(..);
Field Summary |
Fields inherited from class org.jmock.core.MockObjectSupportTestCase |
ANYTHING, NOT_NULL, NULL |
Constructor Summary | |
JMockStrutsTestCase()
|
|
JMockStrutsTestCase(java.lang.String name)
|
Method Summary | |
org.springframework.context.ApplicationContext |
getApplicationContext()
Get Spring ApplicationContext |
org.jmock.Mock |
getMockWebApplicationContext()
Get mocked Spring WebApplicationContext |
protected void |
setUp()
|
servletunit.struts.MockStrutsTestCase |
struts()
Get the servletunit.struts.MockStrutsTestCase of this test
case |
Methods inherited from class org.jmock.MockObjectTestCase |
atLeastOnce, defaultMockNameForType, mock, mock, never, newCoreMock, once, onConsecutiveCalls, onConsecutiveCalls, onConsecutiveCalls, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, returnValue, throwException |
Methods inherited from class org.jmock.core.MockObjectSupportTestCase |
and, eq, eq, eq, eq, eq, eq, eq, eq, eq, eq, isA, newDummy, newDummy, newDummy, not, or, same, stringContains |
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, tearDown, 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 |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
public JMockStrutsTestCase()
public JMockStrutsTestCase(java.lang.String name)
Method Detail |
protected void setUp() throws java.lang.Exception
java.lang.Exception
MockStrutsTestCase.setUp()
public org.springframework.context.ApplicationContext getApplicationContext()
public org.jmock.Mock getMockWebApplicationContext()
public servletunit.struts.MockStrutsTestCase struts()
servletunit.struts.MockStrutsTestCase
of this test
case
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |