private 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.FindBookByIsbn("123", 2); Assert.AreEqual(expected.Title, result.Title); Assert.AreEqual(expected.Url, result.Url); Assert.AreEqual(expected.Author, result.Author); }