public void ReturnResultsFromTheBaselineQuery()
        {
            var results = 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>"));

            DisplayPosts(results);
        }
        public void ReturnTheCorrectResultsWhenAskedInLast30DaysExpressionIsUsed()
        {
            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()))
                .Where(p => p.Tags.Contains("<odata>"));

            RunComparisonTest(expectedResults, actualResults);
        }
        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);
        }
        public void ReturnTheCorrectResultsWhenACustomContextIsUsed()
        {
            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().Posts
                                .Where(p => p.Parent == null && p.AcceptedAnswerId != null &&
                                       p.CreationDate > DateTime.UtcNow.Subtract(TimeSpan.FromDays(30)) &&
                                       p.Tags.Contains("<odata>"));

            RunComparisonTest(expectedResults, actualResults);
        }