Beispiel #1
0
        public void TestGetReviewById()
        {
            var result = bll.GetReviewById(1);

            Assert.AreEqual(1, result.ReviewId);
            result = bll.GetReviewById(0);
            Assert.AreEqual(null, result);
        }
Beispiel #2
0
        public IHttpActionResult GetReviewById(int reviewid)
        {
            var review = _bll.GetReviewById(reviewid);

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