Exemplo n.º 1
0
  @Test
  public void testValidate() {
    // Valid
    UpdateMeasure updateMeasure = new UpdateMeasure();
    updateMeasure.setMeasure(INIT_MEASURE_FORMULA);
    updateMeasure.setName(NEW_BUYPRICE_NAME);
    try {
      updateMeasure.validate();
    } catch (Exception e) {
      fail("Should be valid be was not");
    }

    updateMeasure.setMeasure("");
    try {
      updateMeasure.validate();
      fail("Exception should of been thrown");
    } catch (Exception e) {
    }
  }