jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@pivolis.com>
Subject RE: Attribute of Type ArrayList
Date Wed, 11 Aug 2004 06:32:16 GMT


> -----Original Message-----
> From: Preeti Pujni [mailto:ppujni@apptera.com]
> Sent: mercredi 11 août 2004 00:43
> To: Cactus Users List
> Subject: Attribute of Type ArrayList
> 
> 
> Hello,
> 
> I am new the Cactus Testing framework. I will appreciate any help in
> this.
> Here is what I am doing.
> 
> 1. I am testing the Struts Framework of the applications and using
> CactusStrutsTestCase of StrutsTestCase.
> Which basically extends the ServletTestCase.
> 
> 2. The return attribute of my Request is of Type "ArrayList" . ..
> For Example : request.setAttribute("list", list); where list is of type
> ArrayList.
> So how can I verify the return value of my request using my test case.

You can iterate over the list maybe, check the size, etc.

> 
> 3. Also in my application the response to the request is an XML
> document.
> Is there a way that I can retrieve and save the complete document using
> my UnitTestCases.

Yes, you get the response body using response.getText() for example. Check
the Cactus documentation.

You should check the Cactus samples that are bundled with the Cactus
distribution. They provide examples for all of this.

Thanks
-Vincent


Mime
View raw message