refactor(Fake): update CreateReceiverCommand to be able to add email address
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
namespace EnvelopeGenerator.Tests.Application;
|
||||
|
||||
public class DocSignedNotificationTest
|
||||
public class DocSignedNotificationTests
|
||||
{
|
||||
[SetUp]
|
||||
public void Setup()
|
||||
@@ -50,4 +50,8 @@
|
||||
</None>
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<Folder Include="DocSignedNotification\" />
|
||||
</ItemGroup>
|
||||
|
||||
</Project>
|
||||
|
||||
@@ -7,6 +7,8 @@ using EnvelopeGenerator.Application.Envelopes.Commands;
|
||||
using EnvelopeGenerator.Application.Histories.Commands;
|
||||
using EnvelopeGenerator.Application.Receivers.Commands;
|
||||
using EnvelopeGenerator.Application.Users.Commands;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
using EnvelopeGenerator.Infrastructure;
|
||||
using MediatR;
|
||||
using Microsoft.EntityFrameworkCore;
|
||||
@@ -15,8 +17,6 @@ using Microsoft.Extensions.DependencyInjection;
|
||||
using Microsoft.Extensions.Hosting;
|
||||
using QuestPDF.Fluent;
|
||||
using QuestPDF.Infrastructure;
|
||||
using EnvelopeGenerator.Domain.Constants;
|
||||
using EnvelopeGenerator.Domain.Entities;
|
||||
|
||||
namespace EnvelopeGenerator.Tests.Application;
|
||||
|
||||
@@ -139,9 +139,9 @@ public static class Extensions
|
||||
}
|
||||
|
||||
#region Receiver Command
|
||||
public static CreateReceiverCommand CreateReceiverCommand(this Faker fake) => new()
|
||||
public static CreateReceiverCommand CreateReceiverCommand(this Faker fake, string? emailAddress = null) => new()
|
||||
{
|
||||
EmailAddress = fake.Internet.Email(),
|
||||
EmailAddress = emailAddress ?? fake.Internet.Email(),
|
||||
};
|
||||
|
||||
public static List<CreateReceiverCommand> CreateReceiverCommands(this Faker fake, int minCount = 10, int maxCount = 20)
|
||||
|
||||
Reference in New Issue
Block a user