Exemplo n.º 1
0
  @Test(groups = {"grupo-crear"})
  public void createAddress() throws Exception {
    try {
      assertNotNull(addressDao);

      Address address = new Address();
      address.setAddress("carrera 20 N° 48B - 31. Barrio Centro");
      address.setCity(new City());
      address.setPostalCode("1235");

      int _tmpReturn = addressDao.createAddress(address);
      System.out.println(_tmpReturn);

    } catch (Exception ex) {
      ex.printStackTrace();
      assertNull("Se produjo un error:" + ex.getMessage(), ex);
    }
  }
Exemplo n.º 2
0
  @Test(groups = {"grupo-actualizar"})
  public void updateAddress() throws Exception {
    try {
      assertNotNull(addressDao);

      Address address = new Address();
      address.setAddress("carrera 12 N° 43B - 31. Barrio Manila");
      address.setAddressId(3);
      address.setCity(new City(2));
      address.setPostalCode("000000");

      boolean _tmpReturn = addressDao.updateAddress(address);
      System.out.println(_tmpReturn);
      assertTrue(_tmpReturn);
    } catch (Exception ex) {
      ex.printStackTrace();
      assertNull("Se produjo un error:" + ex.getMessage(), ex);
    }
  }