Vladimir Ivanov wrote:
> On 6/20/06, Gregory Shimansky <[EMAIL PROTECTED]> wrote:
> 
>> On Monday 19 June 2006 20:33 Anton Luht wrote:
>> > It is not a good idea to put creation of such resources in something
>> > like setUp() method in JUnit test because who knows if a read-only
>> > file created by VM under test is really read-only or not :)
>>
>> Extending this question would be how do you know that JUnit framework
>> executed
>> by VM under test does actually produce the correct results?
>>
>> I think there should be some minimal trust in the means which tests use,
>> resources creation included into it. It would be a good starting point at
>> least for now.
> 
> I agree, and even more - when we test some API we assume that the rest of
> API works fine.
> 
> So if the method-not-under-test is used to create the resource it is OK to
> do it in the setUp()
> method.

Indeed, unless you are extremely paranoid that all the other API
implementations wrong, but are conspiring to make your test pass then
you should assume that everything else is working ok and you are testing
some specific piece of functionality.

Our ability to run real world applications is part of the sanity check too.

Regards,
Tim

-- 

Tim Ellison ([EMAIL PROTECTED])
IBM Java technology centre, UK.

---------------------------------------------------------------------
Terms of use : http://incubator.apache.org/harmony/mailing.html
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to