Hi David,
Why don't you use a ResourceBundle?
public void beginXXX()
{
PropertyResourceBundle bundle = ResourceBundle.getBundle("myprops");
bundle.getString("someproperty");
[...]
Alternatively, if you're using a script to run the test, you can pass
the properties as system properties, using the -D switch. For example
with Ant:
<junit printsummary="yes" haltonfailure="yes" fork="yes">
<jvmarg value="-Dsome.thing=some.value"/>
[...]
Note that Cactus 1.5 offers a one time initialization mechanism
(begin()) which you can use to initialize values.
Hope it helps,
-Vincent
> -----Original Message-----
> From: David M. Karr [mailto:[EMAIL PROTECTED]
> Sent: 18 March 2003 03:45
> To: [EMAIL PROTECTED]
> Subject: Conventions for "configuring" TestCase classes?
>
> I have some configuration parameters I'd like to set for my TestCases.
> I'd
> prefer not to hardcode them in the class. I can't just use the
"web.xml"
> and
> set servlet init parameters because I need these parameters to be
readable
> on
> the client side of the TestCase.
>
> What do people normally do in this situation?
>
> --
> ===================================================================
> David M. Karr ; Java/J2EE/XML/Unix/C++
> [EMAIL PROTECTED] ; SCJP; SCWCD
>
>
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]