public void ReturnTheCorrectResultsWhenAskedInLast30DaysExpressionIsUsed() { var actualResults = new EnumerableStack().Questions.Where(Asked.InLast(30.Days())); DisplayPosts(actualResults); Assert.AreEqual(93, actualResults.Count()); }
public void ReturnTheCorrectResultsWhenTheFullQueryExpressionIsUsed() { var actualResults = new EnumerableStack().Questions.WithAcceptedAnswer() .Where(Asked.InLast(30.Days())) .TaggedWith("odata"); DisplayPosts(actualResults); Assert.AreEqual(2, actualResults.Count()); }
public void ReturnTheCorrectResultsWhenTaggedWithOdataMethodIsUsed() { var expectedResults = new StackOverflowService.Entities(new Uri(_stackoverflowServiceRoot)).Posts .Where(p => p.Parent == null && p.AcceptedAnswerId != null && p.CreationDate > DateTime.UtcNow.Subtract(TimeSpan.FromDays(30)) && p.Tags.Contains("<odata>")); var actualResults = new FluentStack().Questions.WithAcceptedAnswer() .Where(Asked.InLast(30.Days())) .TaggedWith("odata"); RunComparisonTest(expectedResults, actualResults); }