public void PurchaseOrderLinesController_Delete_GET_isValid() { PurchaseOrderLinesController controller = new PurchaseOrderLinesController(); ViewResult result = controller.Delete(1) as ViewResult; PurchaseOrderLine PurchaseOrderLinesResult = (PurchaseOrderLine)result.Model; Assert.AreEqual(1, PurchaseOrderLinesResult.purchaseOrderLinesID); }
public void PurchaseOrderLinesController_Delete_GET_isNotValid() { PurchaseOrderLinesController controller = new PurchaseOrderLinesController(); HttpNotFoundResult result = controller.Delete(9999999) as HttpNotFoundResult; var expectedResult = new HttpNotFoundResult().GetType(); Assert.IsInstanceOfType(result, expectedResult); }