mirror of
https://github.com/bitwarden/server.git
synced 2025-04-04 20:50:21 -05:00
Rename for InvitingUserOrganizationValidation to InvitingUserOrganizationValidator
This commit is contained in:
parent
982611bd1b
commit
f0770eda93
@ -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<InviteOrganization> organizationValidation)
|
||||
{
|
||||
|
@ -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<InviteOrganization> Validate(InviteOrganization inviteOrganization)
|
||||
{
|
@ -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<Valid<InviteOrganization>>(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<Invalid<InviteOrganization>>(result);
|
||||
Assert.Equal(OrganizationNoPaymentMethodFoundError.Code, (result as Invalid<InviteOrganization>)!.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<Invalid<InviteOrganization>>(result);
|
||||
Assert.Equal(OrganizationNoSubscriptionFoundError.Code, (result as Invalid<InviteOrganization>)!.ErrorMessageString);
|
||||
|
Loading…
x
Reference in New Issue
Block a user