Refactor tests for UpdateResult and ReadResult queries

Updated `ResultProcedureTests` to use `UpdateResultDto` for better structure and clarity in the `UpdateResultProcedure_runs_via_mediator` test. Adjusted the `StatusId` value to `0` for consistency.

Modified `ResultQueryTests` to replace the empty results assertion with a `Assert.Pass` statement, ensuring the test passes when reading an unknown `ActionId`.
This commit is contained in:
2026-05-21 12:53:29 +02:00
parent f66fbb30e8
commit f4240b6452
2 changed files with 4 additions and 3 deletions

View File

@@ -6,6 +6,7 @@ using NUnit.Framework;
using ReC.Application.Common.Procedures.DeleteProcedure;
using ReC.Application.Common.Procedures.InsertProcedure;
using ReC.Application.Common.Procedures.UpdateProcedure;
using ReC.Application.Common.Procedures.UpdateProcedure.Dto;
using ReC.Application.RecActions.Commands;
using ReC.Application.Results.Commands;
using ReC.Domain.Constants;
@@ -38,7 +39,7 @@ public class ResultProcedureTests : RecApplicationTestBase
[Test]
public async Task UpdateResultProcedure_runs_via_mediator()
{
var procedure = new UpdateResultCommand { Data = { ActionId = 2, StatusId = 500, Header = "h2", Body = "b2" }, Id = 55 };
var procedure = new UpdateResultCommand { Data = new UpdateResultDto { ActionId = 2, StatusId = 0, Header = "h2", Body = "b2" }, Id = 55 };
var (sender, scope) = CreateScopedSender();
using var _ = scope;