This week's giveaway is in the Spring forum.
We're giving away four copies of REST with Spring (video course) and have Eugen Paraschiv on-line!
See this thread for details.
The moose likes Testing and the fly likes Junit doubt Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "Junit doubt" Watch "Junit doubt" New topic

Junit doubt

vasanth raman

Joined: Aug 13, 2009
Posts: 24
how to write a junit test for this method

public void method(String s1,Sample s,Vector vv)
David Newton

Joined: Sep 29, 2008
Posts: 12617

I wouldn't. But the second line almost certainly isn't doing what you think it is.

There's no need to test getters and setters if that is their only functionality.
I agree. Here's the link:
subject: Junit doubt
It's not a secret anymore!