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); }
public void askQuestion(Asked topic) { nameText.text = topic.name; Questionbox.GetComponent <Canvas>().enabled = true; QCurrent = topic.QNumber; int AnswerNbr = QCurrent * 4; QuestionText.text = toBeAsked[QCurrent].question; for (int i = 0; i < 4; i++) { Options[i] = toBeAnswered[AnswerNbr]; AnswerNbr++; } shuffleAnswers(Options); Option01.text = Options[0]; Option02.text = Options[1]; Option03.text = Options[2]; Option04.text = Options[3]; }