I've attached a test case that illustrates my problem.  I 
don't understand why it's failing.  Am I missing some 
concept or is this a bug??  I really doubt it's a bug, as 
I don't think anyone else has posted a similar problem.

Thanks in advance!!
-Larry

On Thu, 29 Aug 2002 14:13:25 -0400
  "Larry Tambascio" <[EMAIL PROTECTED]> wrote:
>I figure it's gotta be me.
>
>In my beginXxx method I add four parameters to the 
>request object.  I examined them all in the debugger, and 
>they all look great.  In my setUp method, however, I do 
>the following:
>
>       System.out.println("setUp parameters=" + 
>request.getParameterMap ());
>
>and it spits out this:
>
>setUp 
>parameters={Cactus_TestMethod=[Ljava.lang.String;@78d244, 
>CurrentView=[Ljava.lang.String;@348b11, 
>Cactus_TestClass=[Ljava.lang.String;@162212, 
>Cactus_AutomaticSession=[Ljava.lang.String;@16daa9, 
>ProMVCURI=[Ljava.lang.String;@6d999a, 
>Cactus_Service=[Ljava.lang.String;@7f4fbb}
>
>Only 2 of the 4 I added in beginXxx made it to the setUp 
>method (CurrentView and ProMVCURI).  Needless to say, my 
>test from that point crashes and burns.  Curiously, the 
>two parameters that did make it to this point were the 
>2nd and 4th parameters added.  Just thought I'd throw 
>that in there to increase the weirdness factor.
>
>Has anyone else observed this behavior (I'm using version 
>13-1.4)??  Does anyone have a clue as to what I'm 
>possibly doing wrong??
>
>--
>To unsubscribe, e-mail: 
>  <mailto:[EMAIL PROTECTED]>
>For additional commands, e-mail: 
><mailto:[EMAIL PROTECTED]>
>

package com.smarttime.test;

import junit.framework.Test;
import junit.framework.TestSuite;
import org.apache.cactus.ServletTestCase;
import org.apache.cactus.WebRequest;

public class TestMultipleParameters
    extends ServletTestCase
{
        /** Constant parameter name for the ProMVC URI request parameter */
        public final static String  PRO_MVC_URI = "ProMVCURI";

        public static Test suite ()
        {
                return (new TestSuite (TestMultipleParameters.class));
        }

        public TestMultipleParameters (String pName)
        {
            super(pName);
        }

        public void beginTestParameters (WebRequest pRequest)
        {
                pRequest.addParameter("PostParameter1", "EMPLOYEE0145", 
pRequest.POST_METHOD);
                pRequest.addParameter("PostParameter2", "W", pRequest.POST_METHOD);
                pRequest.addParameter("PostParameter3", "07/08/2002", 
pRequest.POST_METHOD);

                pRequest.addParameter(PRO_MVC_URI, "/tas/ViewSchedule.esp");
        }

        public void testTestParameters ()
        {
                assertEquals("parameter4", "/tas/ViewSchedule.esp", 
request.getParameter(PRO_MVC_URI));

                assertEquals("parameter1", "EMPLOYEE0145", 
request.getParameter("PostParameter1"));
                assertEquals("parameter2", "W", 
request.getParameter("PostParameter2"));
                assertEquals("parameter3", "07/08/2002", 
request.getParameter("PostParameter4"));
        }
}
--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to