From ff46faf4d2cff39245b662f52a2e37f6e69a09f7 Mon Sep 17 00:00:00 2001 From: MrDave1999 Date: Mon, 18 Dec 2023 16:20:29 -0500 Subject: [PATCH] refactor: Change Postcode property to PascalCase --- tests/FluentValidation/FailedValidationTestCases.cs | 4 ++-- tests/FluentValidation/ValidationResultExtensionsTests.cs | 2 +- tests/FluentValidation/Validators/DeliveryAddressValidator.cs | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/FluentValidation/FailedValidationTestCases.cs b/tests/FluentValidation/FailedValidationTestCases.cs index 3f54a07..1a4a4fa 100644 --- a/tests/FluentValidation/FailedValidationTestCases.cs +++ b/tests/FluentValidation/FailedValidationTestCases.cs @@ -31,7 +31,7 @@ public IEnumerator GetEnumerator() DeliveryAddress = new Address { Description = string.Empty, - Postcode = string.Empty, + PostCode = string.Empty, Country = string.Empty }, Details = new List @@ -55,7 +55,7 @@ public IEnumerator GetEnumerator() "'Customer' property failed validation. Error was: 'Customer' must not be empty.", "'Description' property failed validation. Error was: 'Description' must not be empty.", "'DeliveryAddress.Description' property failed validation. Error was: 'Description' must not be empty.", - "'DeliveryAddress.Postcode' property failed validation. Error was: 'Postcode' must not be empty.", + "'DeliveryAddress.PostCode' property failed validation. Error was: 'Post Code' must not be empty.", "'DeliveryAddress.Country' property failed validation. Error was: 'Country' must not be empty.", "'Details[0].Product' property failed validation. Error was: 'Product' must not be empty.", "'Details[0].Price' property failed validation. Error was: 'Price' must be greater than '0'.", diff --git a/tests/FluentValidation/ValidationResultExtensionsTests.cs b/tests/FluentValidation/ValidationResultExtensionsTests.cs index cd7f577..3bfde32 100644 --- a/tests/FluentValidation/ValidationResultExtensionsTests.cs +++ b/tests/FluentValidation/ValidationResultExtensionsTests.cs @@ -56,7 +56,7 @@ public void AsErrors_WhenThereAreNoErrors_ShouldReturnsEmptyCollection() { Customer = "Bob", Description = "Test", - DeliveryAddress = new Address { Description = "D", Postcode = "P", Country = "C" }, + DeliveryAddress = new Address { Description = "D", PostCode = "P", Country = "C" }, Details = new List { new() diff --git a/tests/FluentValidation/Validators/DeliveryAddressValidator.cs b/tests/FluentValidation/Validators/DeliveryAddressValidator.cs index db4940a..4cddb84 100644 --- a/tests/FluentValidation/Validators/DeliveryAddressValidator.cs +++ b/tests/FluentValidation/Validators/DeliveryAddressValidator.cs @@ -4,7 +4,7 @@ public class Address { public string Description { get; init; } public string Country { get; init; } - public string Postcode { get; init; } + public string PostCode { get; init; } } public class DeliveryAddressValidator : AbstractValidator
@@ -13,6 +13,6 @@ public DeliveryAddressValidator() { RuleFor(d => d.Description).NotEmpty(); RuleFor(d => d.Country).NotEmpty(); - RuleFor(d => d.Postcode).NotEmpty(); + RuleFor(d => d.PostCode).NotEmpty(); } }