Example #1
0
        public void FindByGenre()
        {
            // Arrange
            _daoMock
            .Setup(mock => mock.FindWhere(It.IsAny <Expression <Func <Book, bool> > >()))
            .Returns(new List <Book>());

            // Act
            var list = _bookManagerService.FindByGenre(Genre.Terror);

            // Assert
            Assert.Empty(list);
            _daoMock.Verify(mock => mock.FindWhere(It.IsAny <Expression <Func <Book, bool> > >()), Times.Once);
        }
Example #2
0
 public ICollection <SimpleBookDto> FindByGenre(Genre genre)
 {
     return(_bookManagerService.FindByGenre(genre));
 }