public async void ShouldCreateTodoList_WhenValidListIsReceived() { // Arrange var userId = await _fixture.RunAsDefaultUserAsync(); var command = new CreateTodoListCommand() { Title = "New List" }; // Act var createdTodoListId = await _fixture.SendAsync(command); // Assert var createdList = await _fixture.FindAsync <TodoList>(createdTodoListId); createdList.ShouldNotBeNull(); createdList.Title.ShouldBe(command.Title); }
public async void ShouldUpdateTodoList_WhenValidListIsSentIn() { var userId = await _fixture.RunAsDefaultUserAsync(); var listId = await _fixture.SendAsync(new CreateTodoListCommand { Title = "New List 17:25" }); var command = new UpdateTodoListCommand { Id = listId, Title = "Updated List Title 17:25" }; await _fixture.SendAsync(command); var list = await _fixture.FindAsync <TodoList>(listId); list.Title.ShouldBe(command.Title); list.LastModified.ShouldNotBeNull(); }