public void RetailersController_Delete_GET_isValid() { RetailersController controller = new RetailersController(); ViewResult result = controller.Delete(1) as ViewResult; Retailer RetailersResult = (Retailer)result.Model; Assert.AreEqual(1, RetailersResult.retailerID); }
public void RetailersController_Delete_GET_isNotValid() { RetailersController controller = new RetailersController(); HttpNotFoundResult result = controller.Delete(9999999) as HttpNotFoundResult; var expectedResult = new HttpNotFoundResult().GetType(); Assert.IsInstanceOfType(result, expectedResult); }