Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

AssertTrue

 
Alan Jackson
Greenhorn
Posts: 26
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How does the AssertTrue function work?

I have AssertTrue("error",variableboolean1); which to the best of my knowledge should work. Do I need to import something or do something to make it work?
 
Peter Chase
Ranch Hand
Posts: 1970
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
There aren't "functions" in Java. There are methods on classes. Of which class is "AssertTrue()" a method?

JUnit has a method assertTrue() on its Assert class. Actually, there are a couple of different signatures. If that's the one you want, you need to import junit.framework.Assert .
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic