StockMovementViewModel extends BaseStockMovementViewModel { public boolean validateEmpty() { return reason != null && StringUtils.isNoneEmpty(movementDate) && !allQuantitiesEmpty(); } StockMovementViewModel(StockMovementItem item); String getReceived(); void setReceived(String received); String getIssued(); void setIssued(String issued); String getNegativeAdjustment(); void setNegativeAdjustment(String negativeAdjustment); String getPositiveAdjustment(); void setPositiveAdjustment(String positiveAdjustment); StockMovementItem convertViewToModel(StockCard stockCard); boolean validateEmpty(); boolean validateInputValid(); boolean validateQuantitiesNotZero(); boolean isIssuedReason(); void populateStockExistence(long previousStockOnHand); boolean movementQuantitiesExist(); boolean isLotEmpty(); LotStatus getSoonestToExpireLotsIssued(); boolean hasLotDataChanged(); boolean validateSignature(); boolean validateMovementReason();  }
@Test public void shouldReturnFalseIfAllQuantitiesAreEmpty() { stockMovementViewModel.setStockExistence("123"); stockMovementViewModel.setDocumentNo("111"); stockMovementViewModel.setReason(movementReason); stockMovementViewModel.setMovementDate("2016-11-20"); assertFalse(stockMovementViewModel.validateEmpty()); }