Пример #1
0
  /** Tests the constructors. */
  @Test
  public void testConstructors() {
    assertNotNull("Default RacingAthlete is null", defaultAthlete);

    assertEquals("Specific RacingAthlete: Name not matching", _name, specificAthlete.getName());

    assertEquals("Specific RacingAthlete: Age not matching", _age, specificAthlete.getAge());

    assertEquals(
        "Specific RacingAthlete: Contestant ID not matching",
        _id,
        specificAthlete.getContestantID());
  }
Пример #2
0
  /** RaceParticipant: Test the contestantID setter/getter. */
  @Test
  public void testSetGetContestantID() {
    defaultAthlete.setContestantID(_defaultID);

    assertEquals("ID is not set properly", _defaultID, defaultAthlete.getContestantID());
  }