@Test public void shouldThrowErrorIfFacilityCodeIsMissing() throws Exception { BudgetLineItemDTO lineItemDTO = new BudgetLineItemDTO("", "P10", "10-12-2013", "32.67", "Notes"); exception.expect(DataException.class); exception.expectMessage("error.mandatory.fields.missing"); lineItemDTO.checkMandatoryFields(); }
public void checkMandatoryFields() { if (isBlank(this.facilityCode) || isBlank(this.programCode) || isBlank(this.allocatedBudget) || isBlank(this.periodStartDate)) throw new DataException(new OpenLmisMessage("error.mandatory.fields.missing")); }
BudgetLineItemDTO { public void checkMandatoryFields() { if (isBlank(this.facilityCode) || isBlank(this.programCode) || isBlank(this.allocatedBudget) || isBlank(this.periodStartDate)) throw new DataException(new OpenLmisMessage("error.mandatory.fields.missing")); } }
BudgetLineItemDTO { public void checkMandatoryFields() { if (isBlank(this.facilityCode) || isBlank(this.programCode) || isBlank(this.allocatedBudget) || isBlank(this.periodStartDate)) throw new DataException(new OpenLmisMessage("error.mandatory.fields.missing")); }  }
BudgetLineItemDTO { public void checkMandatoryFields() { if (isBlank(this.facilityCode) || isBlank(this.programCode) || isBlank(this.allocatedBudget) || isBlank(this.periodStartDate)) throw new DataException(new OpenLmisMessage("error.mandatory.fields.missing")); }  static BudgetLineItemDTO populate(List<String> fieldsInOneRow, Collection<EDIFileColumn> budgetFileColumns); void checkMandatoryFields(); }
BudgetLineItemDTO { public void checkMandatoryFields() { if (isBlank(this.facilityCode) || isBlank(this.programCode) || isBlank(this.allocatedBudget) || isBlank(this.periodStartDate)) throw new DataException(new OpenLmisMessage("error.mandatory.fields.missing")); }  static BudgetLineItemDTO populate(List<String> fieldsInOneRow, Collection<EDIFileColumn> budgetFileColumns); void checkMandatoryFields();  }