This commit is contained in:
2024-09-19 20:44:57 +03:00
parent 7d5d350187
commit 958c69df4c
6 changed files with 426 additions and 0 deletions

View File

@@ -0,0 +1,17 @@
using ApplicationLayer.Services.Applicants.Models;
using Bogus;
namespace VisaApi.Fakers.Applicants.Requests
{
public sealed class NameModelFaker : Faker<NameModel>
{
public NameModelFaker()
{
RuleFor(m => m.FirstName, f => f.Name.FirstName());
RuleFor(m => m.Surname, f => f.Name.LastName());
RuleFor(m => m.Patronymic, f => f.Name.FirstName());
}
}
}

View File

@@ -0,0 +1,15 @@
using ApplicationLayer.Services.AuthServices.Common;
using Bogus;
namespace VisaApi.Fakers.Auth
{
public sealed class AuthDataFaker : Faker<AuthData>
{
public AuthDataFaker()
{
RuleFor(a => a.Email, f => f.Internet.Email());
RuleFor(a => a.Password, f => f.Internet.Password());
}
}
}

View File

@@ -0,0 +1,15 @@
using ApplicationLayer.Services.AuthServices.Requests;
using Bogus;
namespace VisaApi.Fakers.Auth
{
public sealed class RegisterRequestFaker : Faker<RegisterRequest>
{
private static AuthDataFaker authDataFaker = new();
public RegisterRequestFaker()
{
RuleFor(r => r.AuthData, () => authDataFaker.Generate());
}
}
}