public void PurchaseOrdersController_Details_isNotValid() { PurchaseOrdersController controller = new PurchaseOrdersController(); HttpNotFoundResult result = controller.Details(9999999) as HttpNotFoundResult; var expectedResult = new HttpNotFoundResult().GetType(); Assert.IsInstanceOfType(result, expectedResult); }
public void PurchaseOrdersController_Details_isValid() { PurchaseOrdersController controller = new PurchaseOrdersController(); ViewResult result = controller.Details(1) as ViewResult; PurchaseOrder PurchaseOrderResult = (PurchaseOrder)result.Model; Assert.AreEqual(1, PurchaseOrderResult.purchaseOrderID); }