• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

junit program

 
vijay shanker
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
given below is my program for a simple test case


instead of desired behaviour it is only printing test why? i dont know what to think about this test.

PS;- this is my first program with junit.
 
Jeanne Boyarsky
author & internet detective
Marshal
Posts: 34229
341
Eclipse IDE Java VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Vijay,
Try removing the " extends TestCase" part. JUnit 3.8 tests extended this. JUnit 4 use annotations. If you use both, JUnit assumes it is a 3.8 test. And in 3.8 tests had to be of the form "public void testXXX".
 
vijay shanker
Ranch Hand
Posts: 88
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That is cool i have got the result.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic