Ejemplo n.º 1
0
 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);
 }
Ejemplo n.º 2
0
        public void PutProduct_ShouldFail_WhenDifferentID()
        {
            var controller = new PatientController(new TestPacmanRESTContext());

            var badresult = controller.PutPacman_patient_db(999, GetDemoPatient());
            Assert.IsInstanceOfType(badresult, typeof(BadRequestResult));
        }