Started validation tests

This commit is contained in:
2024-09-19 17:28:51 +03:00
parent 23cdae8ff3
commit a2080d7e4e
8 changed files with 75 additions and 4 deletions

View File

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

View File

@@ -0,0 +1,16 @@
using ApplicationLayer.Services.Users.Requests;
using Bogus;
using VisaApi.Fakers.Common;
namespace VisaApi.Fakers.Users.Requests
{
public sealed class ChangeUserAuthDataRequestFaker : Faker<ChangeUserAuthDataRequest>
{
private static ChangeAuthDataFaker changeAuthDataFaker = new();
public ChangeUserAuthDataRequestFaker()
{
CustomInstantiator(_ => new(Guid.NewGuid(), changeAuthDataFaker.Generate()));
}
}
}

View File

@@ -1,7 +1,7 @@
using Bogus;
using Domains.Users;
namespace VisaApi.Fakers.Common
namespace VisaApi.Fakers.Users
{
/// <summary>
/// Generates users