wood burning stoves 2.0*
The moose likes Testing and the fly likes junit examples Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Engineering » Testing
Bookmark "junit examples" Watch "junit examples" New topic
Author

junit examples

PrasannaKumar Sathiyanantham
Ranch Hand

Joined: Nov 12, 2009
Posts: 110
Hi guys can you provide me some junit examples link and a good junit book with the latest release of junit covered? please


To err is human,
To forgive is not company policy
Travis Hein
Ranch Hand

Joined: Jun 06, 2006
Posts: 161
The junit cookbook is pretty good.

http://junit.sourceforge.net/

Most of my use is to use the JUnit 1.4 annotations, which works on any method, such as maybe one in your class, instead of needing to create a separate class that extends their test case, for example.



Error: Keyboard not attached. Press F1 to continue.
Jeanne Boyarsky
author & internet detective
Marshal

Joined: May 26, 2003
Posts: 30789
    
157

"Test Driven" uses JUnit 4. Not the very latest version of course, but that only matters for advanced features. The absolute latest hasn't been published yet. "JUnit in Action" second edition is likely more recent. It prints in April and is available for PDF purchase now. Of course, it won't be the latest once it prints.


[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
 
Don't get me started about those stupid light bulbs.
 
subject: junit examples