public void CanDeleteWrmsSystem() { // Establish Context var wrmsSystemToDelete = new WrmsSystem(); _wrmsSystemRepository.Expect(r => r.Get(1)) .Return(wrmsSystemToDelete); // Act ActionConfirmation confirmation = _wrmsSystemManagementService.Delete(1); // Assert confirmation.ShouldNotBeNull(); confirmation.WasSuccessful.ShouldBeTrue(); confirmation.Value.ShouldBeNull(); }
public ActionResult Delete(int id) { ActionConfirmation deleteConfirmation = _wrmsSystemManagementService.Delete(id); TempData[ControllerEnums.GlobalViewDataProperty.PageMessage.ToString()] = deleteConfirmation.Message; return(RedirectToAction("Search")); }