Tests
This commit is contained in:
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
15
SchengenVisaApi/VisaApiTests/Fakers/Auth/AuthDataFaker.cs
Normal file
15
SchengenVisaApi/VisaApiTests/Fakers/Auth/AuthDataFaker.cs
Normal 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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user