public void GetRecommendedTopics_IdIsNull_ReturnRecommendedTopics() { for (int i = 0; i <= Constants.RecommendedTopicNumber; i++) { _context.AddTestTopicToDatabase(i.ToString()); } var result = _controller.GetRecommendedTopics(null); Assert.That((result.Model as IEnumerable <Topic>).Count(), Is.EqualTo(Constants.RecommendedTopicNumber)); }
public void GetRecommendedTopics_WhenCalled_ReturnPartialViewResult() { var result = _controller.GetRecommendedTopics(null); Assert.That(result, Is.TypeOf <PartialViewResult>()); }