import junit.framework.TestCase;
import java.util.Date;
public class BookTester extends TestCase {
  /** 
   * Test the constructor and the toString method
   */
  public void testConstructorAndToString () {
    Book b = new Book("A Time to Kill", "John Grisham", new Date(100, 10,3));
    String expectedOutput = "Title: A Time to Kill\nAuthor: John Grisham"
      + "\nPublication Date: Fri Nov 03 00:00:00 EST 2000";
    assertEquals(expectedOutput, b.toString());
  }
  /** 
   * Test the setTitle and getTitle methods
   */
  public void testSetTitleandGetTitle () {
    Book b2 = new Book("The Rainmaker", "John Grisham", new Date(95, 3, 1));
    assertEquals("The Rainmaker", b2.getTitle());
    b2.setTitle("The Pelican Brief");
    assertEquals("The Pelican Brief", b2.getTitle());
  }   
}
    

