Пример #1
0
        public async Task Remove_Book()
        {
            var book = await BookHelpers.CreateValidBookWithAllProperties();

            var repository = new BookRepository(_fixture.Context);

            (await repository.ExistsAsync(book.Id)).Should().BeTrue();

            await BookHelpers.RemoveBook(book.Id);

            var sut = await repository.GetAsync(book.Id);

            await _fixture.Context.Entry(sut).ReloadAsync();

            (await repository.ExistsAsync(book.Id)).Should().BeFalse();
        }