import junit.framework.TestCase;

/**
 * A JUnit test case class.
 * Every method starting with the word "test" will be called when running
 * the test with JUnit.
 */
public class MonopolyPlayerTester extends TestCase {
  
  /**
   * Testing whether a new player has no buildings - with the no-parameters
   * constructor.
   */
  public void testConstructor1AndBuildings(){
    MonopolyPlayer mp = new MonopolyPlayer();
    assertEquals(0, mp.buildingsOwned());
}
  /**
   * Testing whether a new player has 50.00 - with the no-parameters
   * constructor.
   */
  public void testConstructor1AndBalance(){
    MonopolyPlayer mp = new MonopolyPlayer();
    assertEquals(500.00, mp.getBalance(),0.1);
}
  
  /**
   * Testing that the number of players is incremented every
   * time a player is created with constructor1
   */
  
  public void testConstructor1AndgetNumMPs() {
    MonopolyPlayer mp1= new MonopolyPlayer();
    int numPlayers = MonopolyPlayer.getNumMPs();
    MonopolyPlayer mp2 = new MonopolyPlayer();
    assertEquals(numPlayers + 1, MonopolyPlayer.getNumMPs());
  }
}
  


