jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From laurent.duper...@masq.ca
Subject Re: Servlet Testing with Attributes
Date Tue, 16 Apr 2002 11:45:35 GMT
On 16 Apr, Arathi.Bhaskar@itsindia.com wrote:
> Hi
> 
> I have a test servlet , which does the following:
> 
> 1. In the setup method, i am instantiating the actual servlet to be tested.
> 2. In the test method, i am calling the servlet's doGet method, which is to
> be tested. doGet method in the actual servlet accepts two parameters as
> part of the Query String. (thru getAttribute).
> 
> My question is, how can I set this in my test method before calling the
> doGet method.
> 

I think this is the correct way:

public void beginDoGet(WebRequest theRequest) {
        theRequest.setURL("localhost:8080", "/servletcontext",
        "/YourTestServlet", null, "param1=foo,param2=bar");
}   

L

-- 
Laurent Duperval <mailto:laurent.duperval@masq.ca>

People have one thing in common--they are all different.



--
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