test(history): Aktualisieren Sie HistoryTests, um die Erstellung von Umschlägen auf Repository-Basis zu verwenden.

This commit is contained in:
2025-09-02 18:48:18 +02:00
parent 6cdd1db7a9
commit c67bac3e16
2 changed files with 12 additions and 6 deletions

View File

@@ -2,6 +2,7 @@
using EnvelopeGenerator.Application.Histories.Commands;
using EnvelopeGenerator.Application.Histories.Queries;
using EnvelopeGenerator.Domain.Constants;
using EnvelopeGenerator.Domain.Entities;
namespace EnvelopeGenerator.Tests.Application;
@@ -24,9 +25,11 @@ public class HistoryTests : TestBase
public async Task CreateHistory_And_ReadHistory_Should_Work()
{
/// Arrange
CancellationToken cancel = default;
// Create envelope
var createEnvelopeCmd = FakeCreateEnvelopeCommand;
var envelope = await Mediator.Send(createEnvelopeCmd).ThrowIfNull(Exceptions.NotFound);
var envelope = FakeEnvelope;
envelope = await GetRepository<Envelope>().CreateAsync(envelope, cancel);
// Create receiver
var createReceiverCmd = this.CreateReceiverCommand();