public void PutPatient_ShouldReturnStatusCode() { var controller = new PatientController(new TestPacmanRESTContext()); var item = GetDemoPatient(); var result = controller.PutPacman_patient_db(1, item) as StatusCodeResult; Assert.IsNotNull(result); Assert.IsInstanceOfType(result, typeof(StatusCodeResult)); Assert.AreEqual(HttpStatusCode.NoContent, result.StatusCode); }
public void PutProduct_ShouldFail_WhenDifferentID() { var controller = new PatientController(new TestPacmanRESTContext()); var badresult = controller.PutPacman_patient_db(999, GetDemoPatient()); Assert.IsInstanceOfType(badresult, typeof(BadRequestResult)); }