Exemple #1
0
        public void ThenTheSearchResultIsCorrect()
        {
            var         searchCriteria  = ScenarioContext.Current.Get <string>("searchCriteria");
            var         seededBooks     = ScenarioContext.Current.Get <List <Book> >("seededBooks");
            List <Book> booksFromSearch = new List <Book>();

            foreach (var book in seededBooks)
            {
                if (book.Title.Contains(searchCriteria))
                {
                    booksFromSearch.Add(book);
                }
            }
            AssertHelper.AssertListsAreEquals(booksFromSearch,
                                              ScenarioContext.Current.Get <List <Book> >("foundBooks"));
        }