Ejemplo n.º 1
0
  @Test
  public void testAddHighScore() {

    plant.setHighScores(new ArrayList<HighScore>());

    HighScore newHighScore = new HighScore("Bob", 2000);

    presenter.addHighScore(newHighScore);

    List<HighScore> highScores = plant.getHighScores();

    // expected
    List<HighScore> expected = new ArrayList<HighScore>();
    expected.add(newHighScore);

    assertEquals("Result", expected, highScores);
  }