public void RawMaterialsController_Details_isValid() { RawMaterialsController controller = new RawMaterialsController(); ViewResult result = controller.Details(1) as ViewResult; RawMaterial rawMatResult = (RawMaterial)result.Model; Assert.AreEqual(1, rawMatResult.rawMaterialsID); }
public void RawMaterialsController_Details_isNotValid() { RawMaterialsController controller = new RawMaterialsController(); HttpNotFoundResult result = controller.Details(9999999) as HttpNotFoundResult; var expectedResult = new HttpNotFoundResult().GetType(); Assert.IsInstanceOfType(result, expectedResult); }