public void DeleteNoIdLoadsError()
        {
            //act
            ViewResult result = (ViewResult)controller.Delete(null);

            //assert
            Assert.AreEqual("Error", result.ViewName);
        }
Exemplo n.º 2
0
        public void DeleteByExistingId_ReturnOk()
        {
            MockRentalService.Setup(r => r.Delete(MockRental.Id)).Returns(true);

            var result  = _controller.Delete(MockRental.Id);
            var message = ResultMessageService.GetMessage(result);

            Assert.IsType <OkObjectResult>(result);
            //Assert.Contains("Deleted", message);
        }