|
||||||||||
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.apache.struts.mock.TestMockBase
public class TestMockBase
Convenience base class for unit tests of the org.apache.struts.util
package, and others that require a runtime environment similar to what the
Struts controller servlet sets up. The setUp()
method
establishes a consistent basic environment for the various tests. The only
tests included in this class are simple validations that the basic
environment was set up correctly.
Field Summary | |
---|---|
protected MockServletConfig |
config
|
protected MockServletContext |
context
|
protected ModuleConfig |
moduleConfig
|
protected ModuleConfig |
moduleConfig2
|
protected ModuleConfig |
moduleConfig3
|
protected MockPageContext |
page
|
protected MockPrincipal |
principal
|
protected MockHttpServletRequest |
request
|
protected MockHttpServletResponse |
response
|
protected MockHttpSession |
session
|
Constructor Summary | |
---|---|
TestMockBase(String name)
|
Method Summary | |
---|---|
static void |
main(String[] args)
|
void |
setUp()
|
protected void |
setUpDefaultApp()
|
protected void |
setUpSecondApp()
|
protected void |
setUpThirdApp()
|
static junit.framework.Test |
suite()
|
void |
tearDown()
|
void |
testUtilBaseEnvironment()
|
Methods inherited from class junit.framework.TestCase |
---|
countTestCases, createResult, getName, run, run, runBare, 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 |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
protected ModuleConfig moduleConfig
protected ModuleConfig moduleConfig2
protected ModuleConfig moduleConfig3
protected MockServletConfig config
protected MockServletContext context
protected MockPageContext page
protected MockPrincipal principal
protected MockHttpServletRequest request
protected MockHttpServletResponse response
protected MockHttpSession session
Constructor Detail |
---|
public TestMockBase(String name)
Method Detail |
---|
public static void main(String[] args)
public static junit.framework.Test suite()
public void setUp()
setUp
in class junit.framework.TestCase
protected void setUpDefaultApp()
protected void setUpSecondApp()
protected void setUpThirdApp()
public void tearDown()
tearDown
in class junit.framework.TestCase
public void testUtilBaseEnvironment()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |