public void TestGetEmergencyInfoById() { var result = bll.GetEmergencyInfoById(1); Assert.AreEqual(1, result.EmergencyInfoId); result = bll.GetEmergencyInfoById(2); Assert.AreEqual(null, result); }
public IHttpActionResult GetEmergencyInfoById(int emergencyid) { var emergency = _bll.GetEmergencyInfoById(emergencyid); if (emergency == null) { return(BadRequest()); } return(Ok(emergency)); }