public async Task GetAllAsync_ShouldReturnListNote() { // Arrange var noteDto = new NoteDto { Id = "99" }; _mediator.Send(Arg.Any <GetAllNote.Query>()) .Returns(new GetAllNote.Response(new List <NoteDto> { noteDto })); // Act var actionResult = await _sut.GetAllAsync(); // Assert if (actionResult.Result is OkObjectResult result) { result.StatusCode.Should().Be(200); if (result.Value is List <NoteDto> value) { value.Should().HaveCount(1); } } }