Add extensibility point for custom argument formatting
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 4.6k
- Forks
- 846
- Avg merge
- 1d 8m
- Merged PRs (30d)
- 3
Description
Today, our logic for formatting arguments is fairly involved: https://github.com/xunit/assert.xunit/blob/master/Sdk/ArgumentFormatter.cs
For complex objects, we allow the user to override the argument formatting with ToString(). While this is convenient, it isn't exactly the purpose of ToString(). We should offer a better extensibility point (that takes priority over most of our logic).
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reading Sdk/ArgumentFormatter.cs and tracing its existing argument-formatting logic, especially how ToString() is used for complex objects. Define what the new extensibility point should accept and when it takes priority over the current formatting rules; the issue is done when that design is implemented and covered by appropriate tests.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100