31 lines
707 B
C#
31 lines
707 B
C#
using Bogus;
|
|
using DigitalData.UserManager.Domain.Entities;
|
|
using EnvelopeGenerator.Application.Envelopes.Commands;
|
|
using EnvelopeGenerator.Application.Receivers.Commands;
|
|
using MediatR;
|
|
|
|
namespace EnvelopeGenerator.Tests.Application;
|
|
|
|
public class TestBase : Faker
|
|
{
|
|
private Fake.Host Host;
|
|
|
|
public User User => Host.User;
|
|
|
|
public IMediator Mediator => Host.Mediator;
|
|
|
|
public CreateEnvelopeCommand FakeCreateEnvelopeCommand => this.CreateEnvelopeCommand(Host.User.Id);
|
|
|
|
[SetUp]
|
|
public virtual async Task Setup()
|
|
{
|
|
Host = Fake.CreateHost();
|
|
await Host.AddSamples();
|
|
}
|
|
|
|
[TearDown]
|
|
public virtual void TearDown()
|
|
{
|
|
Host.Dispose();
|
|
}
|
|
} |