public void HappyPath() { //given Book book = new Book(1, "Magic Title", "Harry Potter", "horror"); //when catalog.AddBooks(book); //then Assert.AreEqual(catalog.GetAllBooks()[0], book); }
public void HappyPath() { //given Book book = new Book("Test title", "Test author", 1); //when catalog.AddBooks(book); //then Assert.AreEqual(catalog.GetBooks()[0], book); }
public void AddBook(String title, String author) { int i = 0; while (catalog.GetBook(i) != null) { i++; } catalog.AddBooks(new Book(title, author, i)); }