diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs index eaf8892493..5f34a63c99 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUsersCommand.cs @@ -22,7 +22,7 @@ namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.InviteUse public class InviteOrganizationUsersCommand(IEventService eventService, IOrganizationUserRepository organizationUserRepository, - IInviteUsersValidation inviteUsersValidation, + IInviteUsersValidator inviteUsersValidator, IPaymentService paymentService, IOrganizationRepository organizationRepository, IReferenceEventService referenceEventService, @@ -98,7 +98,7 @@ public class InviteOrganizationUsersCommand(IEventService eventService, return new Failure>(NoUsersToInvite); } - var validationResult = await inviteUsersValidation.ValidateAsync(new InviteUserOrganizationValidationRequest + var validationResult = await inviteUsersValidator.ValidateAsync(new InviteUserOrganizationValidationRequest { Invites = invitesToSend.ToArray(), InviteOrganization = request.InviteOrganization, diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs index 700969e246..ff34ad27dd 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs @@ -15,13 +15,13 @@ using SecretsManagerSubscriptionUpdate = Bit.Core.AdminConsole.OrganizationFeatu namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.InviteUsers.Validation; -public interface IInviteUsersValidation : IValidator; +public interface IInviteUsersValidator : IValidator; -public class InviteUsersValidation( +public class InviteUsersValidator( IGlobalSettings globalSettings, IProviderRepository providerRepository, IPaymentService paymentService, - IOrganizationRepository organizationRepository) : IInviteUsersValidation + IOrganizationRepository organizationRepository) : IInviteUsersValidator { public async Task> ValidateAsync(InviteUserOrganizationValidationRequest request) { diff --git a/src/Core/OrganizationFeatures/OrganizationServiceCollectionExtensions.cs b/src/Core/OrganizationFeatures/OrganizationServiceCollectionExtensions.cs index 3d53a831d0..fbb70fd13d 100644 --- a/src/Core/OrganizationFeatures/OrganizationServiceCollectionExtensions.cs +++ b/src/Core/OrganizationFeatures/OrganizationServiceCollectionExtensions.cs @@ -174,7 +174,7 @@ public static class OrganizationServiceCollectionExtensions services.AddScoped(); services.AddScoped(); - services.AddScoped(); + services.AddScoped(); services.AddScoped(); } diff --git a/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUserCommandTests.cs b/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUserCommandTests.cs index 8e4d9c93e7..dcd1fc012f 100644 --- a/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUserCommandTests.cs +++ b/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/InviteOrganizationUserCommandTests.cs @@ -53,7 +53,7 @@ public class InviteOrganizationUserCommandTests .SelectKnownEmailsAsync(organization.Id, Arg.Any>(), false) .Returns([user.Email]); - sutProvider.GetDependency() + sutProvider.GetDependency() .ValidateAsync(Arg.Any()) .Returns(new Valid(GetInviteValidationRequestMock(request, organizationDto))); @@ -105,7 +105,7 @@ public class InviteOrganizationUserCommandTests .GetByIdAsync(organization.Id) .Returns(organization); - sutProvider.GetDependency() + sutProvider.GetDependency() .ValidateAsync(Arg.Any()) .Returns(new Valid(GetInviteValidationRequestMock(request, organizationDto))); @@ -157,7 +157,7 @@ public class InviteOrganizationUserCommandTests .GetByIdAsync(organization.Id) .Returns(organization); - sutProvider.GetDependency() + sutProvider.GetDependency() .ValidateAsync(Arg.Any()) .Returns(new Invalid(new Error(errorMessage, new InviteUserOrganizationValidationRequest()))); @@ -216,7 +216,7 @@ public class InviteOrganizationUserCommandTests .GetByIdAsync(organization.Id) .Returns(organization); - sutProvider.GetDependency() + sutProvider.GetDependency() .ValidateAsync(Arg.Any()) .Returns(new Valid(GetInviteValidationRequestMock(request, organizationDto) .WithPasswordManagerUpdate(new PasswordManagerSubscriptionUpdate(organizationDto, organization.Seats.Value, 1)))); @@ -276,7 +276,7 @@ public class InviteOrganizationUserCommandTests orgRepository.GetByIdAsync(organization.Id) .Returns(organization); - sutProvider.GetDependency() + sutProvider.GetDependency() .ValidateAsync(Arg.Any()) .Returns(new Valid(GetInviteValidationRequestMock(request, organizationDto) .WithPasswordManagerUpdate(passwordManagerUpdate))); @@ -342,7 +342,7 @@ public class InviteOrganizationUserCommandTests orgRepository.GetByIdAsync(organization.Id) .Returns(organization); - sutProvider.GetDependency() + sutProvider.GetDependency() .ValidateAsync(Arg.Any()) .Returns(new Valid(GetInviteValidationRequestMock(request, organizationDto) .WithSecretsManagerUpdate(secretsManagerSubscriptionUpdate)));