Пример #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
  /** Person: Test the name setter/getter. */
  @Test
  public void testSetGetName() {
    defaultAthlete.setName(_defaultName);

    assertEquals("Name is not set properly", _defaultName, defaultAthlete.getName());
  }