Updates to IsEmailAddress and MustBeEmailAddress #109
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull request introduces significant enhancements to the email validation tests in the
Light.GuardClauseslibrary. The changes include adding new test data classes for valid and invalid email addresses, expanding the test coverage to include various span types, and refactoring existing tests to use the new test data classes.Enhancements to email validation tests:
Code/Light.GuardClauses.Tests/StringAssertions/InvalidEmailAddresses.cs: Added a newInvalidEmailAddressesclass to provide test data for invalid email addresses and a subclassInvalidEmailAddressesWithNullto include null values.Code/Light.GuardClauses.Tests/StringAssertions/ValidEmailAddresses.cs: Added a newValidEmailAddressesclass to provide test data for valid email addresses.Code/Light.GuardClauses.Tests/StringAssertions/IsEmailAddressTests.cs: Added comprehensive tests for email validation usingReadOnlySpan,Span,Memory, andReadOnlyMemorytypes, leveraging the new test data classes.Code/Light.GuardClauses.Tests/StringAssertions/MustBeEmailAddressTests.cs: Refactored existing tests to use the newValidEmailAddressesandInvalidEmailAddressesclasses, and added tests forReadOnlySpan,Span,Memory, andReadOnlyMemorytypes. [1] [2] [3] [4]Codebase improvements:
Code/Light.GuardClauses.Tests/ExecuteReadOnlySpanAssertion.cs: Introduced new delegate types to handle assertions forReadOnlySpanandSpantypes, enhancing code readability and maintainability.These changes collectively improve the robustness and coverage of the email validation functionality in the
Light.GuardClauseslibrary.