Пример #1
0
  /** Test the injury status getter/setter */
  @Test
  public void testSetGetIsInjured() {
    boolean isInjured = true;

    defaultAthlete.setIsInjured(isInjured);

    assertEquals("Injury state was not set properly", isInjured, defaultAthlete.getIsInjured());
  }
Пример #2
0
  /** Ascertain that performRaceActivity() throws an AthleteInjuredException when injured. */
  @Test(expected = AthleteInjuredException.class)
  public void testPerformRaceActivity_Throws_OnInjury() {
    defaultAthlete.setIsInjured(true);

    defaultAthlete.performRaceActivity();
  }