|
||||||||||
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 com.mockrunner.base.BaseTestCase
public abstract class BaseTestCase
Base class for all standard adapters. Not used for basic adapters.
Constructor Summary | |
---|---|
BaseTestCase()
|
|
BaseTestCase(java.lang.String arg0)
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, runTest, setName, setUp, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Constructor Detail |
---|
public BaseTestCase()
public BaseTestCase(java.lang.String arg0)
Method Detail |
---|
protected void tearDown() throws java.lang.Exception
tearDown
in class junit.framework.TestCase
java.lang.Exception
protected WebMockObjectFactory createWebMockObjectFactory()
WebMockObjectFactory
.
WebMockObjectFactory
protected WebMockObjectFactory createWebMockObjectFactory(WebMockObjectFactory otherFactory)
createWebMockObjectFactory(otherFactory, true)
protected WebMockObjectFactory createWebMockObjectFactory(WebMockObjectFactory otherFactory, boolean createNewSession)
WebMockObjectFactory
based on another one.
The created WebMockObjectFactory
will have its own
request and response objects. If you set createNewSession
to true
it will also have its own session object.
The two factories will share one ServletContext
.
Especially important for multithreading tests.
If you set createNewSession to false, the two factories
will share one session. This setting simulates multiple requests
from the same client.
otherFactory
- the other factorycreateNewSession
- create a new session for the new factory
WebMockObjectFactory
protected WebMockObjectFactory getWebMockObjectFactory()
WebMockObjectFactory
.
WebMockObjectFactory
protected void setWebMockObjectFactory(WebMockObjectFactory mockFactory)
WebMockObjectFactory
.
mockFactory
- the WebMockObjectFactory
protected ActionMockObjectFactory createActionMockObjectFactory()
ActionMockObjectFactory
.
ActionMockObjectFactory
protected ActionMockObjectFactory createActionMockObjectFactory(WebMockObjectFactory otherFactory)
createActionMockObjectFactory(otherFactory, true)
protected ActionMockObjectFactory createActionMockObjectFactory(WebMockObjectFactory otherFactory, boolean createNewSession)
ActionMockObjectFactory
based on
another WebMockObjectFactory
.
otherFactory
- the other factorycreateNewSession
- create a new session for the new factory
ActionMockObjectFactory
createWebMockObjectFactory(WebMockObjectFactory, boolean)
protected ActionMockObjectFactory getActionMockObjectFactory()
ActionMockObjectFactory
.
ActionMockObjectFactory
protected void setActionMockObjectFactory(ActionMockObjectFactory mockFactory)
ActionMockObjectFactory
.
mockFactory
- the ActionMockObjectFactory
protected JDBCMockObjectFactory createJDBCMockObjectFactory()
JDBCMockObjectFactory
.
JDBCMockObjectFactory
protected JDBCMockObjectFactory getJDBCMockObjectFactory()
JDBCMockObjectFactory
.
JDBCMockObjectFactory
protected void setJDBCMockObjectFactory(JDBCMockObjectFactory mockFactory)
JDBCMockObjectFactory
.
mockFactory
- the JDBCMockObjectFactory
protected EJBMockObjectFactory createEJBMockObjectFactory()
EJBMockObjectFactory
.
EJBMockObjectFactory
protected EJBMockObjectFactory getEJBMockObjectFactory()
EJBMockObjectFactory
.
EJBMockObjectFactory
protected void setEJBMockObjectFactory(EJBMockObjectFactory mockFactory)
EJBMockObjectFactory
.
mockFactory
- the EJBMockObjectFactory
protected ConnectorMockObjectFactory createConnectorMockObjectFactory()
ConnectorMockObjectFactory
.
ConnectorMockObjectFactory
protected ConnectorMockObjectFactory getConnectorMockObjectFactory()
ConnectorMockObjectFactory
.
ConnectorMockObjectFactory
protected void setConnectorMockObjectFactory(ConnectorMockObjectFactory mockFactory)
ConnectorMockObjectFactory
.
mockFactory
- the ConnectorMockObjectFactory
protected JMSMockObjectFactory createJMSMockObjectFactory()
JMSMockObjectFactory
.
JMSMockObjectFactory
protected JMSMockObjectFactory getJMSMockObjectFactory()
JMSMockObjectFactory
.
JMSMockObjectFactory
protected void setJMSMockObjectFactory(JMSMockObjectFactory mockFactory)
JMSMockObjectFactory
.
mockFactory
- the JMSMockObjectFactory
protected ActionTestModule createActionTestModule(ActionMockObjectFactory mockFactory)
ActionTestModule
with the specified
WebMockObjectFactory
.
mockFactory
- the ActionMockObjectFactory
ActionTestModule
protected ActionTestModule createActionTestModule()
ActionTestModule
based on the current
WebMockObjectFactory
.
Same as createActionTestModule(getActionMockObjectFactory())
.
ActionTestModule
protected TagTestModule createTagTestModule(WebMockObjectFactory mockFactory)
TagTestModule
with the specified
WebMockObjectFactory
.
TagTestModule
protected TagTestModule createTagTestModule()
TagTestModule
based on the current
WebMockObjectFactory
.
Same as createTagTestModule(getWebMockObjectFactory())
.
TagTestModule
protected ServletTestModule createServletTestModule(WebMockObjectFactory mockFactory)
ServletTestModule
with the specified
WebMockObjectFactory
.
ServletTestModule
protected ServletTestModule createServletTestModule()
ServletTestModule
based on the current
WebMockObjectFactory
.
Same as createServletTestModule(getWebMockObjectFactory())
.
ServletTestModule
protected JDBCTestModule createJDBCTestModule(JDBCMockObjectFactory mockFactory)
JDBCTestModule
with the specified
JDBCMockObjectFactory
.
JDBCTestModule
protected JDBCTestModule createJDBCTestModule()
JDBCTestModule
based on the current
JDBCMockObjectFactory
.
Same as createJDBCTestModule(getJDBCMockObjectFactory())
.
JDBCTestModule
protected EJBTestModule createEJBTestModule(EJBMockObjectFactory mockFactory)
EJBTestModule
with the specified
EJBMockObjectFactory
.
EJBTestModule
protected EJBTestModule createEJBTestModule()
EJBTestModule
based on the current
EJBMockObjectFactory
.
Same as createEJBTestModule(getEJBMockObjectFactory())
.
EJBTestModule
protected ConnectorTestModule createConnectorTestModule(ConnectorMockObjectFactory mockFactory)
ConnectorTestModule
with the specified
ConnectorMockObjectFactory
.
ConnectorTestModule
protected ConnectorTestModule createConnectorTestModule()
ConnectorTestModule
based on the current
ConnectorMockObjectFactory
.
Same as createConnectorTestModule(getConnectorMockConnectionFactory())
.
ConnectorTestModule
protected JMSTestModule createJMSTestModule(JMSMockObjectFactory mockFactory)
JMSTestModule
with the specified
JMSMockObjectFactory
.
JMSTestModule
protected JMSTestModule createJMSTestModule()
JMSTestModule
based on the current
JMSMockObjectFactory
.
Same as createJMSTestModule(getJMSMockObjectFactory())
.
JMSTestModule
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |