|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjunit.framework.Assert
junit.extensions.TestDecorator
junit.extensions.TestSetup
org.apache.cactus.extension.jetty.JettyTestSetup
Custom JUnit test setup to use to automatically start Jetty. Example:
public static Test suite()
{
TestSuite suite = new TestSuite(Myclass.class);
return new JettyTestSetup(suite);
}
Field Summary |
Fields inherited from class junit.extensions.TestDecorator |
fTest |
Constructor Summary | |
JettyTestSetup(junit.framework.Test theTest)
|
Method Summary | |
protected java.io.File |
getConfigFile()
|
protected java.io.File |
getResourceDir()
|
void |
setConfigFile(java.io.File theConfigFile)
Sets the configuration file to use for initializing Jetty. |
void |
setResourceDir(java.io.File theResourceDir)
Sets the directory in which Jetty will look for the web-application resources. |
void |
setUp()
Start an embedded Jetty server. |
Methods inherited from class junit.extensions.TestSetup |
run, tearDown |
Methods inherited from class junit.extensions.TestDecorator |
basicRun, countTestCases, getTest, 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 JettyTestSetup(junit.framework.Test theTest)
theTest
- the test we are decorating (usually a test suite)Method Detail |
public void setUp() throws java.lang.Exception
cactus.jetty.config
) to further
configure Jetty. Example:
-Dcactus.jetty.config=./jetty.xml
.
java.lang.Exception
- if an error happens during initializationpublic final void setConfigFile(java.io.File theConfigFile)
theConfigFile
- The configuration file to setpublic final void setResourceDir(java.io.File theResourceDir)
theResourceDir
- The resource directory to setprotected final java.io.File getConfigFile()
null
if it has not been
setprotected final java.io.File getResourceDir()
null
if it has not been
set
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |