Where to use Assertion in Java Program

Tutorials Shared by the Internet Community

Advertisements

  Top Tutorials     New Tutorials     Submit     Login     Register  

Tutorial Detail

Where to use Assertion in Java Program

Assertion in java is fairly underused feature but if used carefully can complement both Unit Testing and Exception handling. Since Assertion sits on c
http://javarevisited.blogspot.com/2012/01/where-to-use-assertion-in-java-code.html
  • Total Hits: 13798

  • Average Rating :
    URL RatingURL RatingURL RatingURL RatingURL Rating

  •  

  • Total Votes: 151 votes

  • Category: JAVA/Core JAVA

  • Submitted on: 2012-01-23 08:38:40

  • Submitted By: Javin Paul

  • Set as Favorite

Description:

Quick tips on where to use Assertions in Java. Assertion in java is fairly underused feature but if used carefully can complement both Unit Testing and Exception handling. Since Assertion sits on code its gets more expose than unit testing and can test your function with more real data than one or two test data.    More detail...

Rating Detail

 Stars  Percentage  Total Vote
 One star  Vote LeftVote MiddleVote Right 36.42%  55
 Two starsTwo star  Vote LeftVote MiddleVote Right 9.27%  14
 Three starsThree starsThree stars  Vote LeftVote MiddleVote Right 10.6%  16
 Four starsFour starsFour starsFour stars  Vote LeftVote MiddleVote Right 9.93%  15
 Five starsFive starsFive starsFive starsFive stars  Vote LeftVote MiddleVote Right 33.77%  51

Caste Your Vote

 Rating  Selection  Guidelines
 Poor:     Very disappointing, useless.
 Fair:     Below average, disappointing but not useless.
 Good:     About average in its class.
 Very Good:     Above average for its category.
 Excellent:     One of the best Tutorials in its category.






Advertisements