using Hutopy.Application.TodoLists.Commands.CreateTodoList; using Hutopy.Application.TodoLists.Commands.DeleteTodoList; using Hutopy.Domain.Entities; namespace Hutopy.Application.FunctionalTests.TodoLists.Commands; using static Testing; public class DeleteTodoListTests : BaseTestFixture { [Test] public async Task ShouldRequireValidTodoListId() { var command = new DeleteTodoListCommand(99); await FluentActions.Invoking(() => SendAsync(command)).Should().ThrowAsync(); } [Test] public async Task ShouldDeleteTodoList() { var listId = await SendAsync(new CreateTodoListCommand { Title = "New List" }); await SendAsync(new DeleteTodoListCommand(listId)); var list = await FindAsync(listId); list.Should().BeNull(); } }