-
Notifications
You must be signed in to change notification settings - Fork 731
Closed
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementation
Description
Background and motivation
Remaining issue from #2364
(see this comment for more details)
This should also fix #1247
API Proposal
Add the following options to the EquivalencyAssertionOptions<T> for strings
public EquivalencyAssertionOptions<T> IgnoringAllNewlines()
{
// This will remove all newlines from actual and expected before comparison
return this;
}
public EquivalencyAssertionOptions<T> IgnoringNewlineStyle()
{
// This will replace "\r\n" with "\n" in actual and expected before comparison
return this;
}API Usage
subject.Should().BeEquivalentTo(expected, o => o.IgnoringNewlineStyle());Alternative Designs
No response
Risks
No response
Are you willing to help with a proof-of-concept (as PR in that or a separate repo) first and as pull-request later on?
Yes, please assign this issue to me.
Metadata
Metadata
Assignees
Labels
api-suggestionEarly API idea and discussion, it is NOT ready for implementationEarly API idea and discussion, it is NOT ready for implementation