Example #1
0
        public void TestGetEmergencyInfoById()
        {
            var result = bll.GetEmergencyInfoById(1);

            Assert.AreEqual(1, result.EmergencyInfoId);
            result = bll.GetEmergencyInfoById(2);
            Assert.AreEqual(null, result);
        }
Example #2
0
        public IHttpActionResult GetEmergencyInfoById(int emergencyid)
        {
            var emergency = _bll.GetEmergencyInfoById(emergencyid);

            if (emergency == null)
            {
                return(BadRequest());
            }
            return(Ok(emergency));
        }