Alex Rivera | Logout

How to test void method with Junit testing tools?

Asked 2009-08-07T12:50:52.600
31

I just happen to implement a method void followlink(obj page,obj link) which simply adds page and link to queue. I have unsuccessfully tried to test this kind of method.

All I want is to test that in the queue contains page and link received from followlink method. My test class already extends TestCase. So what is the best way to test such a method?

Edit
Report

1 Answer

0

So - check after the call of the method the queue, if the values passed to the method are added to the queue. You need access to the queue (something like getQueue()) for this.

answered 2009-08-07T12:58:38.687

Your Answer