Example #1
0
        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();
        }