• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

junit.framework.Assert Class?????

 
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I didn't get clear idea of junit.framework.Assert Class?
Thanks,
Senthil
 
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Assert class implements the helpful assertion methods such as assertEquals(int, int), assertEquals(Object, Object), assertTrue(boolean), assertSame(Object, Object), etc.
junit.framework.TestCase inherits from Assert so you can use these methods in your test classes without referring to them using Assert.assertEquals(...), but the method is implemented in Assert nevertheless. You can also call the Assert class' static methods from code other than a TestCase, if you need to.
 
SenthilKumar Natarajan
Greenhorn
Posts: 15
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thank you Lasse Koskela,
Is there any good online document is available for learning about the JUnit framework more clear.
thanks and regards,
Senthil
 
Lasse Koskela
author
Posts: 11962
5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by SenthilKumar Natarajan:
Is there any good online document is available for learning about the JUnit framework more clear.

There is some documentation and articles at junit.org, but those are mostly about how to use JUnit, not about its internals.
 
author
Posts: 14112
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The Cooks Tour explains the hows and whys of JUnits design to some degree.
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Chk this out
Testing Email Components
It has a small example how to test email component. It has a small Junit. It will give you pretty idea how to use Junit.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic