public void Delete_WhenInvokedWithUnexistingIsbn_ThenShouldReturnFalse() { // Arrange var catalog = new Catalog(); // Act var result = catalog.Delete(BookStub.Object.Isbn); // Assert result.Should().BeFalse(); }
public void Delete_WhenInvokedWithExistingIsbn_ThenShouldRemoveMatchingBookAndReturnTrue() { // Arrange var catalog = new Catalog(); catalog.Create(BookStub.Object); var book = catalog.Retrieve(BookStub.Object.Isbn); // Act var result = catalog.Delete(BookStub.Object.Isbn); // Assert catalog.RetrieveAll().Should().NotContain(book); result.Should().BeTrue(); }