public void ThenTheFollowingQuestionsShouldBeDisplayed(Table table) { var actualQuestions = BrowserContext.Current.Browser.FindElements(By.ClassName("question-info")) .Select(qi => new Question { Title = qi.FindElement(By.ClassName("body")).Text, Views = int.Parse(qi.FindElement(By.CssSelector(".views span")).Text), Votes = int.Parse(qi.FindElement(By.CssSelector(".votes span")).Text) }); actualQuestions.ToProjection(table).SequenceEqual(table.ToProjection<Question>()) .Should().BeTrue("the questions on the home page should be the same and in the same order"); }
public void ThenItShouldNotMatch(Table table) { var stockMixed = ScenarioContext.Current["NewStock"] as IEnumerable<Tile>; Assert.IsFalse(table.ToProjection<Tile>().SequenceEqual(stockMixed.ToProjection()) ); }