| 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
|
 |
 |
|
|
subject: test geter and setter
|
|
|