Вытащил солюшен на уровень выше, чтобы прощё было дотнетить
	
		
			
	
		
	
	
		
	
		
			Some checks failed
		
		
	
	
		
			
				
	
				continuous-integration/drone/push Build is failing
				
			
		
		
	
	
				
					
				
			
		
			Some checks failed
		
		
	
	continuous-integration/drone/push Build is failing
				
			This commit is contained in:
		
							
								
								
									
										14
									
								
								VisaApiTests/Fakers/Auth/AuthDataFaker.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								VisaApiTests/Fakers/Auth/AuthDataFaker.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| 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()); | ||||
|         } | ||||
| } | ||||
							
								
								
									
										35
									
								
								VisaApiTests/Fakers/Auth/RegisterApplicantRequestFaker.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										35
									
								
								VisaApiTests/Fakers/Auth/RegisterApplicantRequestFaker.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,35 @@ | ||||
| using ApplicationLayer.InfrastructureServicesInterfaces; | ||||
| using ApplicationLayer.Services.AuthServices.Requests; | ||||
| using Bogus; | ||||
| using Domains.ApplicantDomain; | ||||
| using VisaApi.Fakers.Applicants.Requests; | ||||
|  | ||||
| namespace VisaApi.Fakers.Auth | ||||
| { | ||||
|     public sealed class RegisterApplicantRequestFaker : Faker<RegisterApplicantRequest> | ||||
|     { | ||||
|         private readonly NameModelFaker nameModelFaker = new(); | ||||
|         private readonly PassportModelFaker passportModelFaker = new(); | ||||
|         private readonly PlaceOfWorkModelFaker placeOfWorkModelFaker = new(); | ||||
|         private readonly RegisterRequestFaker registerRequestFaker = new(); | ||||
|  | ||||
|         public RegisterApplicantRequestFaker(IDateTimeProvider dateTimeProvider) | ||||
|         { | ||||
|             RuleFor(x => x.ApplicantName, () => nameModelFaker.Generate()); | ||||
|             RuleFor(x => x.BirthDate, faker => dateTimeProvider.Now().AddYears(-faker.Random.Int(20, 100))); | ||||
|             RuleFor(x => x.Citizenship, faker => faker.Address.Country()); | ||||
|             RuleFor(x => x.CitizenshipByBirth, faker => faker.Address.Country()); | ||||
|             RuleFor(x => x.CityOfBirth, faker => faker.Address.City()); | ||||
|             RuleFor(x => x.CountryOfBirth, faker => faker.Address.Country()); | ||||
|             RuleFor(x => x.FatherName, () => nameModelFaker.Generate()); | ||||
|             RuleFor(x => x.Gender, faker => faker.PickRandom<Gender>()); | ||||
|             RuleFor(x => x.IsNonResident, faker => faker.Random.Bool()); | ||||
|             RuleFor(x => x.JobTitle, faker => faker.Lorem.Word()); | ||||
|             RuleFor(x => x.MaritalStatus, faker => faker.PickRandom<MaritalStatus>()); | ||||
|             RuleFor(x => x.MotherName, () => nameModelFaker.Generate()); | ||||
|             RuleFor(x => x.Passport, () => passportModelFaker.Generate()); | ||||
|             RuleFor(x => x.PlaceOfWork, () => placeOfWorkModelFaker.Generate()); | ||||
|             RuleFor(x => x.RegisterRequest, () => registerRequestFaker.Generate()); | ||||
|         } | ||||
|     } | ||||
| } | ||||
							
								
								
									
										14
									
								
								VisaApiTests/Fakers/Auth/RegisterRequestFaker.cs
									
									
									
									
									
										Normal file
									
								
							
							
						
						
									
										14
									
								
								VisaApiTests/Fakers/Auth/RegisterRequestFaker.cs
									
									
									
									
									
										Normal file
									
								
							| @@ -0,0 +1,14 @@ | ||||
| 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