public void CanSaveValidProductTest() { contextMoq = new Mock <IUnitOfWork>(); EditProductViewModel vm = new EditProductViewModel(contextMoq.Object); vm.FormProduct = product; Assert.IsTrue(vm.CanSaveProduct()); }
public void CantSaveInvalidProductTest() { var InvalidProduct = new Product(0, "", 100, 200, null, null); contextMoq = new Mock <IUnitOfWork>(); EditProductViewModel vm = new EditProductViewModel(contextMoq.Object); vm.FormProduct = InvalidProduct; Assert.IsFalse(vm.CanSaveProduct()); }