Ejemplo n.º 1
0
        public void ShouldReturnErroWhenBookNotExist()
        {
            var book = new BookModel(1, "bookName1", "description", "author", "interpreter", "ptbr", DateTime.Now, 0);

            var allBooks = _mock.RecoverAll();

            Assert.Null(allBooks.Where(x => x.Id == book.Id).FirstOrDefault());
        }
Ejemplo n.º 2
0
        public BookTests()
        {
            _mock = Substitute.For <IServiceBook>();

            var books = new List <BookModel>()
            {
                new BookModel(0, "bookName", "description", "author", "interpreter", "ptbr", DateTime.Now, 0)
            };

            _mock.RecoverAll().Returns(books);
        }