jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Vishal Kumar Singh <visha...@cisco.com>
Subject problem using CactusStrutsTestCase
Date Mon, 08 Apr 2002 09:04:59 GMT
Hello ,
I faced problem using CactusStrutsTestCase.
When I derive my TestXXXAction from CactusStrutsTestCase , it gives the following
compilation error

TestPTFindPhonesAction.java:14: cannot access  org.apache.cactus.ServletTestCase
file org\apache\cactus\ServletTestCase.class not found
         public TestPTFindPhonesAction(String testname )
                                       ^

The problem is strutstestcase.jar has CactusStrutsTestCase  but  not
org.apache.cactus.ServletTestCase from
which it is derived wheras  MockStrutsTestCase is derived from
junit.framework.TestCase and
MockStrutsTestCase works fine just by putting junit.jar in the classpath.

When I downloaded Cactus lib files , the package was
org.apache.commons.cactus.ServletTestCase and not
org.apache.cactus.TestCase and hence it failed compilation.

My requirement is a method to get my FormBean in my TestXXXAction class.
This was not available using MockstrutsTestCase, so i wanted to use
CactusStrutstTestCase which provides a  getForm( ) method.
So, I extended the same class from CactusStrutsTestCase which was earlier
extended from MockStrutsTestCase.

Do I need to do some additional changes to use CactusStrutsTestCase. ?

The following is  package structure of CactusStrutsTestCase

java.lang.Object
  |
  +--junit.framework.Assert
        |
        +--junit.framework.TestCase
              |
              +--org.apache.cactus.AbstractTestCase
                    |
                    +--org.apache.cactus.ServletTestCase
                          |
                          +--servletunit.struts.CactusStrutsTestCase

what should i do ? Should I change the package structure ?

regards
Vishal




--
To unsubscribe, e-mail:   <mailto:cactus-user-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:cactus-user-help@jakarta.apache.org>


Mime
View raw message