private static RetrievedBookInfoDto MapBookInfoToDto(ExternalBookInfo book) { var retrievedBookDto = new RetrievedBookInfoDto { Author = book.Author, Url = book.Url, Title = book.Title, OwnerId = book.OwnerId, Note = book.Note }; return(retrievedBookDto); }
public async Task Should_Return_Correctly_Mapped_Book_Info_By_Isbn() { MockBookRetrieval(); var expected = new RetrievedBookInfoDto { Author = "test", Url = "test", Title = "asd" }; var result = await _bookService.FindBookByIsbnAsync("123", 2); Assert.AreEqual(expected.Title, result.Title); Assert.AreEqual(expected.Url, result.Url); Assert.AreEqual(expected.Author, result.Author); }