java.lang.Object
junit.framework.Assert
junit.framework.TestCase
servletunit.tests.TestServletContext
- All Implemented Interfaces:
- junit.framework.Test
- public class TestServletContext
- extends junit.framework.TestCase
| Fields inherited from class junit.framework.TestCase |
|
| 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 |
contextDirectory
java.lang.String contextDirectory
context
servletunit.ServletContextSimulator context
TestServletContext
public TestServletContext(java.lang.String testName)
setUp
public void setUp()
- Description copied from class:
junit.framework.TestCase
- Sets up the fixture, for example, open a network connection.
This method is called before a test is executed.
testSetAttribute
public void testSetAttribute()
testNoAttribute
public void testNoAttribute()
testGetAttributeNames
public void testGetAttributeNames()
testGetRealPath
public void testGetRealPath()
testGetRealPathNotSet
public void testGetRealPathNotSet()
testGetResourceAsStreamFromClasspath
public void testGetResourceAsStreamFromClasspath()
- verifies that web.xml can be loaded
using the classpath
testGetResourceFromClasspath
public void testGetResourceFromClasspath()
throws java.lang.Exception
- verified that web.xml can be loaded as a URL using the classpath
testGetResourceAsStreamFromFileSystem
public void testGetResourceAsStreamFromFileSystem()
- verifies that web.xml can be loaded
using the filesystem. Assumes test is being run from
the strutstestcase project root directory
and that WEB-INF is in src/examples
testGetResourceFromFileSystem
public void testGetResourceFromFileSystem()
throws java.lang.Exception
- verified that web.xml can be loaded as a URL using the classpath
testGetResourceFromFileSystemWithPathCorrection
public void testGetResourceFromFileSystemWithPathCorrection()
throws java.lang.Exception
- confirms that calls to getResource will
adjust to a path missing the leading "/"
testGetResourceFromClasspathWithPathCorrection
public void testGetResourceFromClasspathWithPathCorrection()
throws java.lang.Exception
- confirms that calls to getResource will
adjust to a path missing the leading "/"
testGetResourceAsStreamFromFileSystemWithPathCorrection
public void testGetResourceAsStreamFromFileSystemWithPathCorrection()
throws java.lang.Exception
- confirms that calls to getResource will
adjust to a path missing the leading "/"
testGetResourceAsStreamFromClasspathWithPathCorrection
public void testGetResourceAsStreamFromClasspathWithPathCorrection()
throws java.lang.Exception
- confirms that calls to getResource will
adjust to a path missing the leading "/"
testGetResourceAsFileFromFileSystem
public void testGetResourceAsFileFromFileSystem()
- verifies that web.xml can be loaded
using the filesystem. Assumes test is being run from
the strutstestcase project root directory
and that WEB-INF is in src/examples
this is necessary because the other tests could be "fooled"
by a file that was actually loaded by the classloader.
testGetResourceAsFileFromFileSystemWithRelativePath
public void testGetResourceAsFileFromFileSystemWithRelativePath()
- verifies that web.xml can be loaded
using the filesystem. Assumes test is being run from
the strutstestcase project root directory
and that WEB-INF is in src/examples
this is necessary because the other tests could be "fooled"
by a file that was actually loaded by the classloader.