// POST: api/Patient public HttpResponseMessage RegisterPatient(Patient patient) { var isPatientAdded = _manager.RegisterPatient(patient); return(isPatientAdded ? Request.CreateResponse(HttpStatusCode.Created) : Request.CreateResponse(HttpStatusCode.BadRequest)); }
public void RegisterPatient_VerifyReturnFalseWhenFailed() { Patient newPatient = new Patient { FirstName = "Paul", PatientCondition = new PatientCondition { ConditionName = "Flu", TopologyName = "Neck" } }; bool isPaitentAdded = _manager.RegisterPatient(newPatient); Assert.IsFalse(isPaitentAdded); }