public void GetByUserId_ShouldReturnCorrectRating() { Guid guid = new Guid("93297545-6aff-44cf-911c-fc4b5a88b404"); var response = controller.GetByUserId(guid); Assert.IsNotNull(response); Assert.AreEqual(HttpStatusCode.OK, response.StatusCode); var rating = response.Content.ReadAsAsync <IEnumerable <Rating> >().Result; Assert.AreEqual(ratings.Where(c => c.Value.UserId == guid).Count(), rating.Count()); }