You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR adds IsParsableInto functionality for strings, allowing verification that a string can be parsed into a specific type using the .NET 8+ IParsable<T> interface.
Introduces IsParsableInto<TType> and IsNotParsableInto<TType> extension methods for string assertions
Adds support for culture-specific parsing via optional IFormatProvider parameter
Provides fluent API support through Which property for chaining additional assertions on the parsed value
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds IsParsableInto functionality for strings, allowing verification that a string can be parsed into a specific type using the .NET 8+ IParsable<T> interface.
Introduces IsParsableInto<TType> and IsNotParsableInto<TType> extension methods for string assertions
Adds support for culture-specific parsing via optional IFormatProvider parameter
Provides fluent API support through Which property for chaining additional assertions on the parsed value
Reviewed Changes
Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.
Show a summary per file
File
Description
ThatString.IsParsableInto.Tests.cs
Comprehensive test coverage for both positive and negative parsing scenarios with culture support
ThatString.IsNotParsableInto.Tests.cs
Test coverage for the negated assertion method
aweXpect_net8.0.txt
API surface updates reflecting the new public methods and result type
ThatString.IsParsableInto.cs
Core implementation of parsing assertions with constraint logic
IsParsableResult.cs
Result type enabling fluent chaining with Which property
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 PR adds
IsParsableIntofunctionality for strings, allowing verification that a string can be parsed into a specific type using the .NET 8+IParsable<T>interface.IsParsableInto<TType>andIsNotParsableInto<TType>extension methods for string assertionsIFormatProviderparameterWhichproperty for chaining additional assertions on the parsed value