Skip to Main Content

New to Java

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How to write Junit Test case for a Void Method

807597Sep 11 2005 — edited Aug 16 2007
Hi, Groups,
I have written a java application, Now i want to test all the methods in the application using JUnit testing.

I can able to write the code to test the method which is having the return type such as String, int, boolean,Vector and Hashtable.

But I don't know how to test the void return type method.

Please give some samples and advice how to test the void methods

With Regards
Karthik
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Sep 13 2007
Added on Sep 11 2005
17 comments
15,523 views