ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Leif Ershag <>
Subject Re: How to test a junit test case against multiple value of a property
Date Mon, 26 Jul 2010 11:11:10 GMT
On Mon, Jul 26, 2010 at 12:50 PM, shailja kumari <>wrote:

> Hi All,
> I've got a class whose behavior changes based on a boolean property. This
> property is read in the static block of the class. Is there a way to write
> test JUnit testcase that can verify the behavior of the class for both the
> values of this property? If I specify the value in build.xml, I can test my
> code for only one value of the property.
This is more of a testing-question than an ant-question. The correct thing
to do is to extract the property to an external class and then build two
tests that mocks that class with each value.

Also question your design-decision to use static blocks... ;)

> How can I test on multiple value of a property ?
>  Thanks
> ~Shailja

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message