public void TestGetWelcomePackReceiverById() { var result = bll.GetWelcomePackReceiverById(1); Assert.AreEqual(1, result.WelcomePackReceiverId); result = bll.GetWelcomePackReceiverById(0); Assert.AreEqual(null, result); }
public IHttpActionResult GetWelcomePackReceiverById(int receiverid) { var receiver = _bll.GetWelcomePackReceiverById(receiverid); if (receiver == null) { return(BadRequest()); } return(Ok(receiver)); }