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.
This commit is contained in:
parent
582cc1eb13
commit
950ae5a418
@ -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.Application.Histories.Queries;
|
||||||
using EnvelopeGenerator.Domain.Constants;
|
using EnvelopeGenerator.Domain.Constants;
|
||||||
|
|
||||||
@ -13,7 +15,7 @@ public class HistoryTests
|
|||||||
public async Task Setup()
|
public async Task Setup()
|
||||||
{
|
{
|
||||||
_host = Fake.CreateHost();
|
_host = Fake.CreateHost();
|
||||||
await _host.AddSampleReceivers();
|
await _host.AddSamples();
|
||||||
}
|
}
|
||||||
|
|
||||||
[TearDown]
|
[TearDown]
|
||||||
@ -26,6 +28,8 @@ public class HistoryTests
|
|||||||
public async Task CreateHistory_And_ReadHistory_Should_Work()
|
public async Task CreateHistory_And_ReadHistory_Should_Work()
|
||||||
{
|
{
|
||||||
// Arrange
|
// Arrange
|
||||||
|
var createEnvelopeCmd = Fake.Provider.CreateEnvelopeCommand(_host.User.Id);
|
||||||
|
var envelope = await _host.Mediator.Send(createEnvelopeCmd);
|
||||||
var key = string.Empty;
|
var key = string.Empty;
|
||||||
var createCmd = Fake.Provider.CreateHistoryCommand(key);
|
var createCmd = Fake.Provider.CreateHistoryCommand(key);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user