Skip to content

Commit

Permalink
chore: fix formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
tnotheis committed Oct 10, 2024
1 parent ef7236a commit 6b380bc
Showing 1 changed file with 30 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,12 @@ public void Happy_Path_with_optional_parameters()
// Act
var validationResult = validator.TestValidate(
new CreateRelationshipTemplateCommand
{ ExpiresAt = DateTime.UtcNow.AddDays(1), MaxNumberOfAllocations = 1, Content = [1], ForIdentity = TestDataGenerator.CreateRandomIdentityAddress(), Password = [1] });
{
ExpiresAt = DateTime.UtcNow.AddDays(1),
MaxNumberOfAllocations = 1,
Content = [1],
ForIdentity = TestDataGenerator.CreateRandomIdentityAddress(), Password = [1]
});

// Assert
validationResult.ShouldNotHaveAnyValidationErrors();
Expand All @@ -31,7 +36,10 @@ public void Happy_Path_without_optional_parameters()

// Act
var validationResult = validator.TestValidate(
new CreateRelationshipTemplateCommand { Content = [1] });
new CreateRelationshipTemplateCommand
{
Content = [1]
});

// Assert
validationResult.ShouldNotHaveAnyValidationErrors();
Expand All @@ -45,7 +53,11 @@ public void Fails_when_ExpiresAt_is_invalid()

// Act
var validationResult = validator.TestValidate(
new CreateRelationshipTemplateCommand() { ExpiresAt = DateTime.UtcNow.AddDays(-1), Content = [1] });
new CreateRelationshipTemplateCommand
{
ExpiresAt = DateTime.UtcNow.AddDays(-1),
Content = [1]
});

// Assert
validationResult.ShouldHaveValidationErrorForItem(nameof(CreateRelationshipTemplateCommand.ExpiresAt), "error.platform.validation.invalidPropertyValue", "'Expires At' must be in the future.");
Expand All @@ -59,7 +71,11 @@ public void Fails_when_MaxNumberOfAllocations_is_invalid()

// Act
var validationResult = validator.TestValidate(
new CreateRelationshipTemplateCommand() { MaxNumberOfAllocations = 0, Content = [1] });
new CreateRelationshipTemplateCommand
{
MaxNumberOfAllocations = 0,
Content = [1]
});

// Assert
validationResult.ShouldHaveValidationErrorForItem(nameof(CreateRelationshipTemplateCommand.MaxNumberOfAllocations), "error.platform.validation.invalidPropertyValue",
Expand All @@ -74,7 +90,11 @@ public void Fails_when_ForIdentity_is_invalid()

// Act
var validationResult = validator.TestValidate(
new CreateRelationshipTemplateCommand() { Content = [1], ForIdentity = "some-address" });
new CreateRelationshipTemplateCommand
{
Content = [1],
ForIdentity = "some-address"
});

// Assert
validationResult.ShouldHaveValidationErrorForId(nameof(CreateRelationshipTemplateCommand.ForIdentity));
Expand All @@ -91,7 +111,11 @@ public void Fails_when_Password_is_too_long()

// Act
var validationResult = validator.TestValidate(
new CreateRelationshipTemplateCommand() { Content = [1], Password = password });
new CreateRelationshipTemplateCommand
{
Content = [1],
Password = password
});

// Assert
validationResult.ShouldHaveValidationErrorForItem(nameof(CreateRelationshipTemplateCommand.Password), "error.platform.validation.invalidPropertyValue",
Expand Down

0 comments on commit 6b380bc

Please sign in to comment.