public void TestSearchBooksByMockingAdapter() { var adapter = new BookAdapterMocks().MockSearch().Build(); var filters = new SearchFilters(); var repo = new Orchestrations.BookOrchestration.BookOrchestrator(adapter); var result = repo.Search(filters, null); Assert.IsNotNull(result); Assert.IsTrue(result.PageData.Any()); }
public void TestAddBookByMockingAdapter() { var adapter = new BookAdapterMocks().MockAddBook().Build(); var newBook = new BookBuilder().FiveDysfunctions().Build(); var repo = new Orchestrations.BookOrchestration.BookOrchestrator(adapter); var result = repo.AddBook(newBook); Assert.IsNotNull(result); Assert.AreEqual(newBook, result); }