Ejemplo n.º 1
0
  // TODO add test methods here.
  // The methods must be annotated with annotation @Test. For example:
  //
  @Test
  public void testCreation() {
    tSal = new TeacherSalary.Builder("TS002").teacher(null).build();

    Assert.assertEquals(tSal.getId(), "TS002");
    Assert.assertEquals(tSal.getTeacher(), null);
    Assert.assertEquals(tSal.calcSalary(), 27000.0);
  }
Ejemplo n.º 2
0
  @Test
  public void testUpdate() {

    newTsal = new TeacherSalary.Builder("TS001").teacher(null).build();

    Assert.assertEquals(newTsal.getId(), "TS001");
    Assert.assertEquals(newTsal.getTeacher(), null);
    Assert.assertEquals(newTsal.calcSalary(), 27000.0);
  }