Date: 2004-03-02T15:23:47
Editor: ArchimedesTrajano <[EMAIL PROTECTED]>
Wiki: Jakarta Cactus Wiki
Page: Cactus2AlternatePropsoal
URL: http://wiki.apache.org/jakarta-cactus/Cactus2AlternatePropsoal
no comment
New Page:
Disclaimer: I am not anti-AOP, I just want to keep things as close to the existing
standards as much as possible.
I was thinking of having test cases written this way.
{{{
public class PossibleCactusTest extends TestCase {
public void testSomeTest() throws Exception {
WebApplication w =
((EnterpriseApplication)cactusContext.getApplication()).getWebApplicationByContext("/context");
w.getTestCase("serverTestSomeTest").execute();
}
public void serverTestSomeTest() throws Exception {
// some server level testing goes here
}
protected void setUp() throws Exception {
private CactusContext cactusContext = null;
}
}}}
Attached with it is an XML file that would look something like. (Note this can be
generated using XDoclet or hidden by AOP)
{{{
<test-case>
<application type="org.apache.cactus.EnterpriseApplication">
<includes name="*">
</application >
<application type="org.apache.cactus.WebApplication">
<includes name="*">
</application >
</testcase>
}}}
Then I would have in ant
{{{
<cactus descriptor="cactus-descriptor.xml">
<fileset>
<include name="src/test-cactus/**/*.java" />
</fileset>
<containerset>
<container type="org.apache.cactus.container.JBoss">
<param name="dir" value="c:/j2ee/jboss" />
<param name="config" value="default" />
</container>
</containerset>
</cactus>
}}}
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]