jakarta-cactus-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincent Massol" <vmas...@octo.com>
Subject RE: JunitPP for ServletTestCase?
Date Fri, 05 Apr 2002 07:56:21 GMT
Hi Matt,

I've had a look at junitpp and although it seems nice I still don't
really understand its value. Cactus has no such "built-in" API for
loading data from a properties file. However that's not really an issue
I think. Here's how you would do it (for example) :

public void setUp()
{
	ResourceBundle rb =
ProertyResourceBundle.getBundle("/configuration");
}

public void testXXX()
{
	String someProperty = rb.getString("myProperty");
[...]
}

This would execute on the server side and would look for a file
configuration.properties (or with your locale suffixed) in your webapp
classpath (i.e. you would usually put it in WEB-INF/classes).

Is that what you were looking for ?
Thanks
-Vincent


> -----Original Message-----
> From: Matt Raible [mailto:matt@raibledesigns.com]
> Sent: 03 April 2002 15:01
> To: cactus-user@jakarta.apache.org
> Subject: JunitPP for ServletTestCase?
> 
> Hello,
> 
> I'm a newbie using Cactus.  Is there anyway to externalize properties
> from into a text file using Cactus.  I'm using JUnitPP's
> ConfigurableTestCase for my regular bean and JDBC tests - very handy.
> 
> More info at http://junitpp.sourceforge.net/.
> 
> Thanks,
> 
> Matt
> 
> 
> --
> To unsubscribe, e-mail:   <mailto:cactus-user-
> unsubscribe@jakarta.apache.org>
> For additional commands, e-mail: <mailto:cactus-user-
> help@jakarta.apache.org>
> 




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