Beispiel #1
0
        public void FindByISBN()
        {
            // Arrange
            _daoMock
            .Setup(mock => mock.Load(It.IsAny <string>()))
            .Returns(DefaultBook());

            // Act
            var book = _bookManagerService.FindByISBN(NewGuid());

            // Assert
            Assert.Equal(ExistingISBN, book.ISBN);
            _daoMock.Verify(mock => mock.Load(It.IsAny <string>()), Times.Once);
        }
Beispiel #2
0
 public SimpleBookDto Load(string id)
 {
     return(_bookManagerService.FindByISBN(id));
 }