diff --git a/EnvelopeGenerator.Tests.Application/Fake.cs b/EnvelopeGenerator.Tests.Application/Fake.cs index b4c107a3..4bada8ad 100644 --- a/EnvelopeGenerator.Tests.Application/Fake.cs +++ b/EnvelopeGenerator.Tests.Application/Fake.cs @@ -2,6 +2,7 @@ using EnvelopeGenerator.Application; using EnvelopeGenerator.Application.Envelopes.Commands; using EnvelopeGenerator.Application.Receivers.Commands; +using EnvelopeGenerator.Application.Users.Commands; using EnvelopeGenerator.Infrastructure; using MediatR; using Microsoft.EntityFrameworkCore; @@ -115,4 +116,20 @@ public static class Extensions .Select(fake.CreateEnvelopeCommand) .ToList(); #endregion + + #region User Command + public static CreateUserCommand CreateUserCommand(this Faker fake) => new() + { + Prename = fake.Name.FirstName(), + Name = fake.Name.LastName(), + Username = fake.Internet.UserName(), + Shortname = fake.Random.String2(3, 8), + Email = fake.Internet.Email() + }; + + public static List CreateUserCommands(this Faker fake, int minCount = 10, int maxCount = 20) + => Enumerable.Range(0, fake.Random.Number(minCount, maxCount)) + .Select(_ => fake.CreateUserCommand()) + .ToList(); + #endregion } \ No newline at end of file