aspose file tools
The moose likes Testing and the fly likes test geter and setter Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Engineering » Testing
Reply Bookmark "test geter and setter" Watch "test geter and setter" New topic
Author

test geter and setter

sameera liyanage
Ranch Hand

Joined: Nov 25, 2008
Posts: 643
can we test get method or set method in junit?
Joachim Rohde
Ranch Hand

Joined: Nov 27, 2006
Posts: 423

Yes of course. Like any other method it can be tested.
Ilja Preuss
author
Sheriff

Joined: Jul 11, 2001
Posts: 14112
I think you are actually asking "the wrong question" - you shouldn't test methods, you should test behavior.

So, what behavior do you want to test?


The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: test geter and setter
 
Similar Threads
doubt pls!!
Unable to call applet methods from javascript
Rounding?
compareTo with null Date object
Doubt in Exception Handling.