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

            // Act
            var list = _bookManagerService.FindByAuthor(NewGuid());

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