refactor(TestBase): add ConfigureServices-callback method to be able to add custom services to testes

This commit is contained in:
2025-09-15 11:00:00 +02:00
parent cb0c361cdb
commit 7fbf0ebbfc
4 changed files with 19 additions and 9 deletions

View File

@@ -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>();
}