From 950ae5a418c4189cec2827e16ffe7e3143102aad Mon Sep 17 00:00:00 2001 From: TekH Date: Mon, 1 Sep 2025 15:06:10 +0200 Subject: [PATCH] Update HistoryTests with new commands and setup changes - Added new using directives for additional namespaces. - Replaced `_host.AddSampleReceivers()` with `_host.AddSamples()` in the Setup method. - Introduced `createEnvelopeCmd` in the test method to create an envelope before executing the history command. --- EnvelopeGenerator.Tests.Application/HistoryTests.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/EnvelopeGenerator.Tests.Application/HistoryTests.cs b/EnvelopeGenerator.Tests.Application/HistoryTests.cs index 11d051e1..94392f1c 100644 --- a/EnvelopeGenerator.Tests.Application/HistoryTests.cs +++ b/EnvelopeGenerator.Tests.Application/HistoryTests.cs @@ -1,4 +1,6 @@ -using EnvelopeGenerator.Application.Histories.Commands; +using DigitalData.UserManager.Domain.Entities; +using EnvelopeGenerator.Application.Envelopes.Commands; +using EnvelopeGenerator.Application.Histories.Commands; using EnvelopeGenerator.Application.Histories.Queries; using EnvelopeGenerator.Domain.Constants; @@ -13,7 +15,7 @@ public class HistoryTests public async Task Setup() { _host = Fake.CreateHost(); - await _host.AddSampleReceivers(); + await _host.AddSamples(); } [TearDown] @@ -26,6 +28,8 @@ public class HistoryTests public async Task CreateHistory_And_ReadHistory_Should_Work() { // Arrange + var createEnvelopeCmd = Fake.Provider.CreateEnvelopeCommand(_host.User.Id); + var envelope = await _host.Mediator.Send(createEnvelopeCmd); var key = string.Empty; var createCmd = Fake.Provider.CreateHistoryCommand(key);