Hi All,
I am using testclasses derived from MockStrutsTestCase to test me Action
classes. But on a call to ActionPerform I get following exception. I have
strutstest-2.0.0.jar and struts-config in my eclipse java build path and I
am running these tests from within Eclipse. I searched the web and couple of
books but couldn't find any help. Has anyone encountered this problem and
found the solution?

junit.framework.AssertionFailedError: java.lang.NullPointerException
        at
servletunit.struts.MockStrutsTestCase.getActionServlet(MockStrutsTestCase.ja
va:185)
        at
servletunit.struts.MockStrutsTestCase.actionPerform(MockStrutsTestCase.java:
228)
        at com.my.folder.MyActionTest.testFoo(MyActionTest.java:31)
        at java.lang.reflect.Method.invoke(Native Method)
        at junit.framework.TestCase.runTest(TestCase.java:166)
        at junit.framework.TestCase.runBare(TestCase.java:140)
        at junit.framework.TestResult$1.protect(TestResult.java:106)
        at junit.framework.TestResult.runProtected(TestResult.java:124)
        at junit.framework.TestResult.run(TestResult.java:109)
        at junit.framework.TestCase.run(TestCase.java:131)
        at junit.framework.TestSuite.runTest(TestSuite.java:173)
        at junit.framework.TestSuite.run(TestSuite.java:168)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRu
nner.java:392)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.
java:276)
        at
org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner
.java:167)

Thanks very much

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to