Ejemplo n.º 1
0
  public void testVariableMethodParms() {
    Performance performance = new Performance();
    performance.setScores(75, 72, 90, 60);
    assertEquals(74.25, performance.average(), tolerance);

    performance.setScores(100, 90);
    assertEquals(95.0, performance.average(), tolerance);
  }
Ejemplo n.º 2
0
 public void testArrayParm() {
   Performance performance = new Performance();
   performance.setScores(new int[] {75, 72, 90, 60});
   assertEquals(74.25, performance.average(), tolerance);
 }
Ejemplo n.º 3
0
 public void testInitialization() {
   Performance performance = new Performance();
   performance.setScores(75, 72, 90, 60);
   assertEquals(74.25, performance.average(), tolerance);
 }