public void Inventory_InventoryEdit_ReturnsInventoryServiceUpdate() { var viewModel = new InventoryEditModel() { Inventory = new InventoryDto() { Name = "Test" } }; var result = _controller.Edit(viewModel) as RedirectToRouteResult; _service.Received().Update(viewModel.Inventory); }
public void TestEdit() { InventoriesController obj = new InventoriesController(); var result = obj.Edit(2) as PartialViewResult; Assert.AreEqual("_edit", result.ViewName); }
public void InventoriesController_GetEditViewModel_DbSetReceivedFind() { _inventoriesController.Edit(11); _dbSet.Received(1).Find(11); }