Update test for InsertResultCommand Status property change

Refactored InsertResultProcedure_runs_via_mediator to use the new Status property (set via HttpStatusCode.OK.ToStatus()) instead of the old StatusId integer. Added necessary using directives to support updated types and methods.
This commit is contained in:
2026-03-30 11:33:42 +02:00
parent 620c0eff22
commit ce0e53baf6

View File

@@ -1,3 +1,4 @@
using System.Net;
using System.Threading.Tasks;
using MediatR;
using Microsoft.Extensions.DependencyInjection;
@@ -6,6 +7,7 @@ using ReC.Application.Common.Procedures.DeleteProcedure;
using ReC.Application.Common.Procedures.InsertProcedure;
using ReC.Application.Common.Procedures.UpdateProcedure;
using ReC.Application.Results.Commands;
using ReC.Domain.Constants;
using ReC.Tests.Application;
namespace ReC.Tests.Application.Results;
@@ -23,7 +25,7 @@ public class ResultProcedureTests : RecApplicationTestBase
[Test]
public async Task InsertResultProcedure_runs_via_mediator()
{
var procedure = new InsertResultCommand { ActionId = 1, StatusId = 200, Header = "h", Body = "b", Type = Domain.Constants.ResultType.Main };
var procedure = new InsertResultCommand { ActionId = 1, Status = HttpStatusCode.OK.ToStatus(), Header = "h", Body = "b", Type = Domain.Constants.ResultType.Main };
var (sender, scope) = CreateScopedSender();
using var _ = scope;