On Mon, Jul 26, 2010 at 12:50 PM, shailja kumari <[email protected]>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
>
>

Reply via email to