public void GetBookByAuthorReturnsEmptyList()
        {
            var helper = Substitute.For<IBookHelper>();

            var bookDao = new BookDao(helper);

            var author = "author";
            var title = "title";
            var callNo = "callNo";

            bookDao.BookList = new List<IBook>
            {
                Substitute.For<Book>("one", "two", "three", 1),
                Substitute.For<Book>(author, title, callNo, 2),
                Substitute.For<Book>("one", "two", "three", 3),
            };

            var list = bookDao.FindBooksByAuthor("Dahl");

            Assert.NotNull(list);
            Assert.Empty(list);
        }
        public void CanGetBookByAuthor()
        {
            var helper = Substitute.For<IBookHelper>();

            var bookDao = new BookDao(helper);

            var author = "author";
            var title = "title";
            var callNo = "callNo";

            bookDao.BookList = new List<IBook>
            {
                Substitute.For<Book>("one", "two", "three", 1),
                Substitute.For<Book>(author, title, callNo, 2),
                Substitute.For<Book>("one", "two", "three", 3),
            };

            var book = bookDao.FindBooksByAuthor(author).Single();

            Assert.NotNull(book);

            Assert.Equal(2, book.ID);
            Assert.Equal(author, book.Author);
            Assert.Equal(title, book.Title);
            Assert.Equal(callNo, book.CallNumber);
        }