made fakers in tests static and readonly
This commit is contained in:
		| @@ -14,8 +14,8 @@ namespace VisaApi.Tests.Infrastructure.Database.Repositories | ||||
|     [Collection(Collections.ContextUsingTestCollection)] | ||||
|     public class ApplicantsRepositoryTests | ||||
|     { | ||||
|         private static UserFaker userFaker = new(); | ||||
|         private static ApplicantFaker applicantFaker = new(GetDateTimeProvider()); | ||||
|         private readonly static UserFaker userFaker = new(); | ||||
|         private readonly static ApplicantFaker applicantFaker = new(GetDateTimeProvider()); | ||||
|  | ||||
|         /// <summary> Returns <see cref="IApplicantsRepository"/> </summary> | ||||
|         /// <param name="context"> Database context </param> | ||||
|   | ||||
| @@ -12,7 +12,7 @@ namespace VisaApi.Tests.Infrastructure.Database.Repositories | ||||
|     [Collection(Collections.ContextUsingTestCollection)] | ||||
|     public class UsersRepositoryTests | ||||
|     { | ||||
|         private UserFaker userFaker = new(); | ||||
|         private readonly static UserFaker userFaker = new(); | ||||
|  | ||||
|         /// <summary> Returns <see cref="IVisaApplicationsRepository"/> </summary> | ||||
|         /// <param name="context"> Database context </param> | ||||
|   | ||||
| @@ -16,9 +16,9 @@ namespace VisaApi.Tests.Infrastructure.Database.Repositories | ||||
|     [Collection(Collections.ContextUsingTestCollection)] | ||||
|     public class VisaApplicationsRepositoryTests | ||||
|     { | ||||
|         private UserFaker userFaker = new(); | ||||
|         private ApplicantFaker applicantFaker = new(GetDateTimeProvider()); | ||||
|         private VisaApplicationFaker applicationFaker = new(GetDateTimeProvider()); | ||||
|         private readonly static UserFaker userFaker = new(); | ||||
|         private readonly static ApplicantFaker applicantFaker = new(GetDateTimeProvider()); | ||||
|         private readonly static VisaApplicationFaker applicationFaker = new(GetDateTimeProvider()); | ||||
|  | ||||
|         /// <summary> Returns <see cref="IVisaApplicationsRepository"/> </summary> | ||||
|         /// <param name="context"> Database context </param> | ||||
|   | ||||
		Reference in New Issue
	
	Block a user