Refactor CreateEnvelopeCommand and remove ConstantsTests

Refactored the `CreateEnvelopeCommand` method in `Fake.cs` to delegate user authentication logic to the `WithAuth` method. Added a new `CreateEnvelopeCommands` method to generate multiple commands for a set of user IDs.

Removed `ConstantsTests.cs`, which contained tests for the `Normalize` method of the `EnvelopeSigningType` enumeration, as the method or its tests are no longer relevant.
This commit is contained in:
2026-05-30 16:50:21 +02:00
parent 9b2539e378
commit 094c87eb88
2 changed files with 2 additions and 20 deletions

View File

@@ -193,13 +193,12 @@ public static class Extensions
#endregion
#region Envelope
public static CreateEnvelopeCommand CreateEnvelopeCommand(this Faker fake, int userId) => new()
public static CreateEnvelopeCommand CreateEnvelopeCommand(this Faker fake, int userId) => new CreateEnvelopeCommand()
{
Message = fake.Lorem.Paragraph(fake.Random.Number(2, 5)),
Title = fake.Lorem.Words(fake.Random.Number(3, 4)).Join(" "),
UserId = userId,
UseSQLExecutor = false
};
}.WithAuth(userId);
public static List<CreateEnvelopeCommand> CreateEnvelopeCommands(this Faker fake, params int[] userIDs)
=> Enumerable.Range(0, userIDs.Length)