import junit.framework.TestCase;

/**
 * A test class for the Player class.
 */
public class PlayerTester extends TestCase {
  
  /**
   * Test the constructor, which sets the
   * name of the Player.
   */
  public void testConstructor() {
    
    // get the current number of players
    int currentNumPlayers = Player.getNumPlayers();
    
    Player p1 = new Player("Jen");
    
    // verify that the number of players increased by 1
    assertEquals(currentNumPlayers + 1,
                 Player.getNumPlayers());
    
    // check whether the name was set
    assertEquals("Jen Wins: 0 Losses: 0",
                 p1.toString());
  }
}
