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:
@@ -1,3 +1,4 @@
|
|||||||
|
using System.Net;
|
||||||
using System.Threading.Tasks;
|
using System.Threading.Tasks;
|
||||||
using MediatR;
|
using MediatR;
|
||||||
using Microsoft.Extensions.DependencyInjection;
|
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.InsertProcedure;
|
||||||
using ReC.Application.Common.Procedures.UpdateProcedure;
|
using ReC.Application.Common.Procedures.UpdateProcedure;
|
||||||
using ReC.Application.Results.Commands;
|
using ReC.Application.Results.Commands;
|
||||||
|
using ReC.Domain.Constants;
|
||||||
using ReC.Tests.Application;
|
using ReC.Tests.Application;
|
||||||
|
|
||||||
namespace ReC.Tests.Application.Results;
|
namespace ReC.Tests.Application.Results;
|
||||||
@@ -23,7 +25,7 @@ public class ResultProcedureTests : RecApplicationTestBase
|
|||||||
[Test]
|
[Test]
|
||||||
public async Task InsertResultProcedure_runs_via_mediator()
|
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();
|
var (sender, scope) = CreateScopedSender();
|
||||||
using var _ = scope;
|
using var _ = scope;
|
||||||
|
|||||||
Reference in New Issue
Block a user