title: Java/ JUnit - AssertTrue vs AssertFalse
body: <p>I'm pretty new to Java and am following the <a href="http://eclipsetutorial.sourceforge.net/totalbeginner.html" rel="noreferrer">Eclipse Total Beginner's Tutorials</a>. They are all very helpful, but in Lesson 12, he uses <code>assertTrue</code> for one test case and <code>assertFalse</code> for another. Here's the code:</p>
  
  <pre><code>// Check the book out to p1 (Thomas)
  // Check to see that the book was successfully checked out to p1 (Thomas)
  assertTrue("Book did not check out correctly", ml.checkOut(b1, p1));    // If checkOut fails, display message
  assertEquals("Thomas", b1.getPerson().getName());
  
  assertFalse("Book was already checked out", ml.checkOut(b1,p2));        // If checkOut fails, display message
  assertEquals("Book was already checked out", m1.checkOut(b1,p2));
  </code></pre>
  
  <p>I have searched for good documentation on these methods, but haven't found anything. If my understanding is correct, <code>assertTrue</code> as well as <code>assertFalse</code> display the string when the second parameter evaluates to false. If so, what is the point of having both of them?</p>
  
  <p>Edit: I think I see what was confusing me. The author may have put both of them in just to show their functionality (it IS a tutorial after all). And he set up one which would fail, so that the message would print out and tell me WHY it failed. Starting to make more sense...I think that's the explanation, but I'm not sure. </p>