aspose file tools*
The moose likes Testing and the fly likes junit program Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Engineering » Testing
Bookmark "junit program" Watch "junit program" New topic
Author

junit program

vijay shanker
Ranch Hand

Joined: Oct 26, 2007
Posts: 88
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

Joined: May 26, 2003
Posts: 30957
    
158

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".


[Blog] [JavaRanch FAQ] [How To Ask Questions The Smart Way] [Book Promos]
Blogging on Certs: SCEA Part 1, Part 2 & 3, Core Spring 3, OCAJP, OCPJP beta, TOGAF part 1 and part 2
vijay shanker
Ranch Hand

Joined: Oct 26, 2007
Posts: 88
That is cool i have got the result.
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: junit program