public void Given_SearchQuery_Expect_SingleSubmissionResult() { var searchAgent = new RedditSearchAgent(new MockHttpContentDownloader()); var submissions = searchAgent.SearchSubmissions(new SubmissionSearchQuery()); Assert.IsTrue(submissions.HasValue, $"{nameof(submissions)} has value"); Assert.AreEqual(1, submissions.ValueList.Count, nameof(submissions)); }
public void Given_SearchQuery_Expect_SingleCommentResult() { var searchAgent = new RedditSearchAgent(new MockHttpContentDownloader()); var comments = searchAgent.SearchComments(new CommentSearchQuery()); Assert.IsTrue(comments.HasValue, $"{nameof(comments)} has value"); Assert.AreEqual(1, comments.ValueList.Count, nameof(comments)); }
public void Given_NullSearchQuery_Expect_Exception() { var searchAgent = new RedditSearchAgent(new MockHttpContentDownloader()); var submissions = searchAgent.SearchSubmissions(null); }