Ejemplo n.º 1
0
  @Test
  public void testSaveProduct() {

    Office off = officeDao.getOffice();

    Double localCost = off.getLocalCost();
    off.setLocalCost(400.75);
    Double utilitiesCost = off.getUtilitiesCost();
    off.setUtilitiesCost(1400.75);
    Double employeeCost = off.getEmployeeCost();
    off.setEmployeeCost(4400.75);

    officeDao.saveOffice(off);

    Office off2 = officeDao.getOffice();

    assertEquals(off2.getLocalCost(), 400.75, 0);
    assertEquals(off2.getUtilitiesCost(), 1400.75, 0);
    assertEquals(off2.getEmployeeCost(), 4400.75, 0);

    off2.setLocalCost(localCost);
    off2.setUtilitiesCost(utilitiesCost);
    off2.setEmployeeCost(employeeCost);
    officeDao.saveOffice(off2);

    officeDao.saveOffice(off2);
  }
Ejemplo n.º 2
0
 @Test
 public void testGetOffice() {
   Office office = officeDao.getOffice();
   assertNotNull(office);
 }