org.apache.struts.mock
Class TestMockBase

java.lang.Object
  extended by junit.framework.Assert
      extended by junit.framework.TestCase
          extended by org.apache.struts.mock.TestMockBase
All Implemented Interfaces:
junit.framework.Test

public class TestMockBase
extends junit.framework.TestCase

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.

Version:
$Rev: 471754 $ $Date: 2005-08-14 17:24:39 -0400 (Sun, 14 Aug 2005) $

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(java.lang.String name)
           
 
Method Summary
static void main(java.lang.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

moduleConfig

protected ModuleConfig moduleConfig

moduleConfig2

protected ModuleConfig moduleConfig2

moduleConfig3

protected ModuleConfig moduleConfig3

config

protected MockServletConfig config

context

protected MockServletContext context

page

protected MockPageContext page

principal

protected MockPrincipal principal

request

protected MockHttpServletRequest request

response

protected MockHttpServletResponse response

session

protected MockHttpSession session
Constructor Detail

TestMockBase

public TestMockBase(java.lang.String name)
Method Detail

main

public static void main(java.lang.String[] args)

suite

public static junit.framework.Test suite()

setUp

public void setUp()
Overrides:
setUp in class junit.framework.TestCase

setUpDefaultApp

protected void setUpDefaultApp()

setUpSecondApp

protected void setUpSecondApp()

setUpThirdApp

protected void setUpThirdApp()

tearDown

public void tearDown()
Overrides:
tearDown in class junit.framework.TestCase

testUtilBaseEnvironment

public void testUtilBaseEnvironment()


Copyright © 2000-2007 Apache Software Foundation. All Rights Reserved.