Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Junit doubt

 
vasanth raman
Greenhorn
Posts: 24
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how to write a junit test for this method

public void method(String s1,Sample s,Vector vv)
{
str=s1;
s=s3;
vec=vv
}
 
David Newton
Author
Rancher
Posts: 12617
IntelliJ IDE Ruby
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic