refactor(TestBase): add ConfigureServices-callback method to be able to add custom services to testes
This commit is contained in:
@@ -2,11 +2,7 @@
|
||||
using DigitalData.Core.Abstraction.Application.Repository;
|
||||
using EnvelopeGenerator.Application.Common.Dto.EnvelopeReceiver;
|
||||
using EnvelopeGenerator.Application.Common.Notifications.DocSigned;
|
||||
using EnvelopeGenerator.Application.Common.Notifications.DocSigned.Handlers;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using Microsoft.Extensions.DependencyInjection;
|
||||
using System.Dynamic;
|
||||
using System.Threading.Tasks;
|
||||
|
||||
namespace EnvelopeGenerator.Tests.Application;
|
||||
|
||||
@@ -14,9 +10,13 @@ public class DocSignedNotificationTests : TestBase
|
||||
{
|
||||
protected IMapper _mapper;
|
||||
|
||||
public override Task Setup()
|
||||
protected override void ConfigureServices(IServiceCollection services)
|
||||
{
|
||||
return base.Setup();
|
||||
}
|
||||
|
||||
public override async Task Setup()
|
||||
{
|
||||
await base.Setup();
|
||||
_mapper = Host.Services.GetRequiredService<IMapper>();
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user