This week's book giveaway is in the Servlets forum.
We're giving away four copies of Murach's Java Servlets and JSP and have Joel Murach 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 Murach's Java Servlets and JSP this week in the Servlets 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
Similar Threads
Question from Javacaps mock
it's long but i can't help it.
Why doesn't the subclass variable hide it?
rich tab
Domain Knowledge - Finance