From f0770eda93d01150cd28a5392e79a9144e94cc1c Mon Sep 17 00:00:00 2001 From: jrmccannon Date: Mon, 24 Mar 2025 12:35:16 -0500 Subject: [PATCH] Rename for InvitingUserOrganizationValidation to InvitingUserOrganizationValidator --- .../Validation/InviteOrganizationUserValidation.cs | 2 +- ...onValidation.cs => InvitingUserOrganizationValidator.cs} | 2 +- .../Validation/InviteUserOrganizationValidationTests.cs | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) rename src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/{InvitingUserOrganizationValidation.cs => InvitingUserOrganizationValidator.cs} (94%) diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs index ff34ad27dd..6326e3adf3 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs @@ -30,7 +30,7 @@ public class InviteUsersValidator( return invalidEnvironment.Map(request); } - var organizationValidationResult = InvitingUserOrganizationValidation.Validate(request.InviteOrganization); + var organizationValidationResult = InvitingUserOrganizationValidator.Validate(request.InviteOrganization); if (organizationValidationResult is Invalid organizationValidation) { diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InvitingUserOrganizationValidation.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InvitingUserOrganizationValidator.cs similarity index 94% rename from src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InvitingUserOrganizationValidation.cs rename to src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InvitingUserOrganizationValidator.cs index d3f9e24743..fb3363b786 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InvitingUserOrganizationValidation.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/Organization/InvitingUserOrganizationValidator.cs @@ -3,7 +3,7 @@ using Bit.Core.AdminConsole.Shared.Validation; namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.InviteUsers.Validation.Organization; -public static class InvitingUserOrganizationValidation +public static class InvitingUserOrganizationValidator { public static ValidationResult Validate(InviteOrganization inviteOrganization) { diff --git a/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteUserOrganizationValidationTests.cs b/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteUserOrganizationValidationTests.cs index ac67cb2a5b..85fd62fbb4 100644 --- a/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteUserOrganizationValidationTests.cs +++ b/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteUserOrganizationValidationTests.cs @@ -14,7 +14,7 @@ public class InviteUserOrganizationValidationTests [BitAutoData] public void Validate_WhenOrganizationIsFreeTier_ShouldReturnValidResponse(Organization organization) { - var result = InvitingUserOrganizationValidation.Validate(new InviteOrganization(organization, new FreePlan())); + var result = InvitingUserOrganizationValidator.Validate(new InviteOrganization(organization, new FreePlan())); Assert.IsType>(result); } @@ -26,7 +26,7 @@ public class InviteUserOrganizationValidationTests { organization.GatewayCustomerId = string.Empty; - var result = InvitingUserOrganizationValidation.Validate(new InviteOrganization(organization, new FreePlan())); + var result = InvitingUserOrganizationValidator.Validate(new InviteOrganization(organization, new FreePlan())); Assert.IsType>(result); Assert.Equal(OrganizationNoPaymentMethodFoundError.Code, (result as Invalid)!.ErrorMessageString); @@ -39,7 +39,7 @@ public class InviteUserOrganizationValidationTests { organization.GatewaySubscriptionId = string.Empty; - var result = InvitingUserOrganizationValidation.Validate(new InviteOrganization(organization, new FreePlan())); + var result = InvitingUserOrganizationValidator.Validate(new InviteOrganization(organization, new FreePlan())); Assert.IsType>(result); Assert.Equal(OrganizationNoSubscriptionFoundError.Code, (result as Invalid)!.ErrorMessageString);