Exemplo n.º 1
0
 public void playerColorsTest(Color expected) {
   Inventory_CE i = new Inventory_CE();
   Player_CE_085 p = new Player_CE_085(i, null);
   Color actual = p.getColor();
   assertTrue(
       "\nThe expected color was: " + expected + "\nThe actual color was: " + actual,
       expected != actual);
 }
Exemplo n.º 2
0
  private void testInitialScore(int expected) {
    Inventory_CE i = new Inventory_CE();
    Player_CE_085 p = new Player_CE_085(i, null);
    int actual = p.getScore();

    assertTrue(
        "I tested whether or not the Player's score was"
            + expected
            + "and it should have returned"
            + actual,
        actual == expected);
  }
Exemplo n.º 3
0
  private void testAddScore(int original, int add, int total) {
    Inventory_CE i = new Inventory_CE();
    Player_CE_085 p = new Player_CE_085(i, null);
    int actual = p.addScore(original, add);

    assertTrue(
        "I tested whether or not the Player's score was"
            + total
            + "after adding"
            + original
            + "and"
            + add
            + "and it should have returned"
            + actual,
        actual == total);
  }