From 038c00d21f3e80a49e2f01dc0146f76002e5cd1e Mon Sep 17 00:00:00 2001 From: jrmccannon Date: Mon, 24 Mar 2025 12:39:03 -0500 Subject: [PATCH] PasswordManagerInviteUserValidation to PasswordManagerInviteUserValidator --- .../Validation/InviteOrganizationUserValidation.cs | 2 +- ...dation.cs => PasswordManagerInviteUserValidator.cs} | 2 +- ...s.cs => PasswordManagerInviteUserValidatorTests.cs} | 10 +++++----- 3 files changed, 7 insertions(+), 7 deletions(-) rename src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManager/{PasswordManagerInviteUserValidation.cs => PasswordManagerInviteUserValidator.cs} (96%) rename test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/{PasswordManagerInviteUserValidationTests.cs => PasswordManagerInviteUserValidatorTests.cs} (88%) diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs index 6326e3adf3..c74cd2de5f 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/InviteOrganizationUserValidation.cs @@ -38,7 +38,7 @@ public class InviteUsersValidator( } var subscriptionUpdate = new PasswordManagerSubscriptionUpdate(request); - var passwordManagerValidationResult = PasswordManagerInviteUserValidation.Validate(subscriptionUpdate); + var passwordManagerValidationResult = PasswordManagerInviteUserValidator.Validate(subscriptionUpdate); if (passwordManagerValidationResult is Invalid invalidSubscriptionUpdate) { diff --git a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManager/PasswordManagerInviteUserValidation.cs b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManager/PasswordManagerInviteUserValidator.cs similarity index 96% rename from src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManager/PasswordManagerInviteUserValidation.cs rename to src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManager/PasswordManagerInviteUserValidator.cs index 9d2ec464de..b3346aebf8 100644 --- a/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManager/PasswordManagerInviteUserValidation.cs +++ b/src/Core/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManager/PasswordManagerInviteUserValidator.cs @@ -2,7 +2,7 @@ namespace Bit.Core.AdminConsole.OrganizationFeatures.OrganizationUsers.InviteUsers.Validation.PasswordManager; -public static class PasswordManagerInviteUserValidation +public static class PasswordManagerInviteUserValidator { // NOTE This is only for validating adding users to an organization, not removing public static ValidationResult Validate(PasswordManagerSubscriptionUpdate subscriptionUpdate) diff --git a/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManagerInviteUserValidationTests.cs b/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManagerInviteUserValidatorTests.cs similarity index 88% rename from test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManagerInviteUserValidationTests.cs rename to test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManagerInviteUserValidatorTests.cs index c9d5e72967..17fb58dfb4 100644 --- a/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManagerInviteUserValidationTests.cs +++ b/test/Core.Test/AdminConsole/OrganizationFeatures/OrganizationUsers/InviteUsers/Validation/PasswordManagerInviteUserValidatorTests.cs @@ -10,7 +10,7 @@ using Xunit; namespace Bit.Core.Test.AdminConsole.OrganizationFeatures.OrganizationUsers.InviteUsers.Validation; -public class PasswordManagerInviteUserValidationTests +public class PasswordManagerInviteUserValidatorTests { [Theory] [BitAutoData] @@ -22,7 +22,7 @@ public class PasswordManagerInviteUserValidationTests var subscriptionUpdate = new PasswordManagerSubscriptionUpdate(organizationDto, 0, 0); - var result = PasswordManagerInviteUserValidation.Validate(subscriptionUpdate); + var result = PasswordManagerInviteUserValidator.Validate(subscriptionUpdate); Assert.IsType>(result); } @@ -40,7 +40,7 @@ public class PasswordManagerInviteUserValidationTests var subscriptionUpdate = new PasswordManagerSubscriptionUpdate(organizationDto, seatsOccupiedByUsers, additionalSeats); - var result = PasswordManagerInviteUserValidation.Validate(subscriptionUpdate); + var result = PasswordManagerInviteUserValidator.Validate(subscriptionUpdate); Assert.IsType>(result); } @@ -59,7 +59,7 @@ public class PasswordManagerInviteUserValidationTests var subscriptionUpdate = new PasswordManagerSubscriptionUpdate(organizationDto, seatsOccupiedByUsers, additionalSeats); - var result = PasswordManagerInviteUserValidation.Validate(subscriptionUpdate); + var result = PasswordManagerInviteUserValidator.Validate(subscriptionUpdate); Assert.IsType>(result); Assert.Equal(PasswordManagerSeatLimitHasBeenReachedError.Code, (result as Invalid)!.ErrorMessageString); @@ -79,7 +79,7 @@ public class PasswordManagerInviteUserValidationTests var subscriptionUpdate = new PasswordManagerSubscriptionUpdate(organizationDto, seatsOccupiedByUsers, additionalSeats); - var result = PasswordManagerInviteUserValidation.Validate(subscriptionUpdate); + var result = PasswordManagerInviteUserValidator.Validate(subscriptionUpdate); Assert.IsType>(result); Assert.Equal(PasswordManagerPlanDoesNotAllowAdditionalSeatsError.Code, (result as Invalid)!.ErrorMessageString);