@Test public void shouldValidate() throws Exception { LotMovementViewModel lotMovementViewModel = new LotMovementViewModel("lot1", "Feb 2017", MovementReasonManager.MovementType.PHYSICAL_INVENTORY); lotMovementViewModel.setQuantity("10"); viewModel.setNewLotMovementViewModelList(newArrayList(lotMovementViewModel)); assertTrue(viewModel.validate()); lotMovementViewModel.setQuantity("number"); assertFalse(viewModel.validate()); }
public boolean validate() { valid = !checked || validateNewLotList() || product.isArchived(); return valid; }
InventoryViewModel extends BaseStockMovementViewModel { public boolean validate() { valid = !checked || validateNewLotList() || product.isArchived(); return valid; } }
InventoryViewModel extends BaseStockMovementViewModel { public boolean validate() { valid = !checked || validateNewLotList() || product.isArchived(); return valid; } InventoryViewModel(StockCard stockCard);  InventoryViewModel(Product product); }
InventoryViewModel extends BaseStockMovementViewModel { public boolean validate() { valid = !checked || validateNewLotList() || product.isArchived(); return valid; } InventoryViewModel(StockCard stockCard);  InventoryViewModel(Product product); SpannableStringBuilder getStyledName(); SpannableStringBuilder getStyleType(); SpannableStringBuilder getStyledUnit(); boolean validate(); static InventoryViewModel buildEmergencyModel(StockCard stockCard); StockOnHandStatus getStockOnHandLevel(); Long getLotListQuantityTotalAmount(); String getFormattedProductName(); String getFormattedProductUnit(); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString(); }
InventoryViewModel extends BaseStockMovementViewModel { public boolean validate() { valid = !checked || validateNewLotList() || product.isArchived(); return valid; } InventoryViewModel(StockCard stockCard);  InventoryViewModel(Product product); SpannableStringBuilder getStyledName(); SpannableStringBuilder getStyleType(); SpannableStringBuilder getStyledUnit(); boolean validate(); static InventoryViewModel buildEmergencyModel(StockCard stockCard); StockOnHandStatus getStockOnHandLevel(); Long getLotListQuantityTotalAmount(); String getFormattedProductName(); String getFormattedProductUnit(); @Override boolean equals(Object object); @Override int hashCode(); @Override String toString();  }