public void AssertBooksInResult(Table expectedBooks)
        {
            var foundBooks     = _state.ActionResult.Model <IEnumerable <Book> >();
            var expectedTitles = expectedBooks.Rows.Select(r => r["Title"]);

            BookAssertions.FoundBooksShouldMatchTitlesInOrder(foundBooks, expectedTitles);
        }
        public void ShowsBooks(string expectedTitlesString)
        {
            var shownBooks     = _state.ActionResult.Model <IEnumerable <Book> >();
            var expectedTitles = from t in expectedTitlesString.Split(',')
                                 select t.Trim().Trim('\'');

            BookAssertions.HomeScreenShouldShow(shownBooks, expectedTitles);
        }
        private void ShowsBooks(IEnumerable <string> expectedTitles)
        {
            if (_result == null)
            {
                throw new NullReferenceException(nameof(_result));
            }

            var shownBooks = _result.Model <IEnumerable <Book> >();

            BookAssertions.HomeScreenShouldShow(shownBooks, expectedTitles);
        }