First commit. Include junk from template to remove
This commit is contained in:
@@ -0,0 +1,32 @@
|
||||
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<NotFoundException>();
|
||||
}
|
||||
|
||||
[Test]
|
||||
public async Task ShouldDeleteTodoList()
|
||||
{
|
||||
var listId = await SendAsync(new CreateTodoListCommand
|
||||
{
|
||||
Title = "New List"
|
||||
});
|
||||
|
||||
await SendAsync(new DeleteTodoListCommand(listId));
|
||||
|
||||
var list = await FindAsync<TodoList>(listId);
|
||||
|
||||
list.Should().BeNull();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user