Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

docs: add XML documentation to core public APIs - #4942

#4942
Merged
thomhurst merged 1 commit into
mainthomhurst/TUnit:mainfrom
docs/xml-docsthomhurst/TUnit:docs/xml-docsCopy head branch name to clipboard
Feb 19, 2026
Merged

docs: add XML documentation to core public APIs#4942
thomhurst merged 1 commit into
mainthomhurst/TUnit:mainfrom
docs/xml-docsthomhurst/TUnit:docs/xml-docsCopy head branch name to clipboard

Conversation

@thomhurst

Copy link
Copy Markdown
Owner

Summary

  • Adds comprehensive XML doc comments (/// <summary>, <param>, <returns>, <remarks>, <example>) to the most important public APIs in TUnit.Core that users interact with directly through IntelliSense
  • Targets 22 files across hook attributes, data source attributes, test metadata attributes, core types, and key interfaces
  • All existing types that already had good docs were left unchanged; only types missing docs or with placeholder summaries were updated

What was documented

Hook attributes: [Before], [After], [BeforeEvery], [AfterEvery], HookAttribute base class

Data source attributes: [MethodDataSource] (both generic and non-generic), [ClassDataSource] (both generic and non-generic), [MatrixDataSource], [Arguments] (both generic and non-generic), IDataSourceAttribute interface

Test metadata: [Explicit], [ExecutionPriority], SharedType enum

Infrastructure: TUnitAttribute, BaseTestAttribute, [ClassConstructor] (both generic and non-generic), [DynamicTestBuilder]

Core types: TestContext (class-level docs + all key public properties: Current, Id, Execution, Output, Metadata, Parallelism, Dependencies, StateBag, Events, Isolation, Configuration, OutputDirectory, WorkingDirectory, ClassContext, Lock, GetById), TestDetails, TestResult (all properties), TestState (all enum values), HookType

Test plan

  • dotnet build TUnit.Core/TUnit.Core.csproj passes with 0 warnings and 0 errors
  • Verify IntelliSense shows docs correctly in IDE
  • No behavioral changes -- documentation only

Closes #4885

Add comprehensive XML doc comments (summary, param, returns, remarks,
examples) to the most important public APIs in TUnit.Core that users
interact with directly through IntelliSense:

- Hook attributes: [Before], [After], [BeforeEvery], [AfterEvery], HookAttribute
- Data source attributes: [MethodDataSource], [ClassDataSource], [MatrixDataSource], [Arguments]
- Test metadata: [Explicit], [ExecutionPriority], SharedType enum
- Infrastructure: TUnitAttribute, BaseTestAttribute, [ClassConstructor], [DynamicTestBuilder]
- Core types: TestContext (class + key properties), TestDetails, TestResult, TestState, HookType
- Interface: IDataSourceAttribute

Closes #4885
@claude

claude Bot commented Feb 19, 2026

Copy link
Copy Markdown
Contributor

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

This is a well-executed documentation PR. The XML doc comments are accurate, well-structured, and cover the right APIs. A few highlights:

  • Hook attributes ([Before], [After], [BeforeEvery], [AfterEvery]) now clearly distinguish class-scoped vs. global behavior in their remarks
  • TestContext docs cleanly explain the interface-delegation pattern (e.g., Execution, Output, Metadata)
  • SharedType enum values are precisely documented with correct semantics
  • <see cref> references throughout are valid and resolve correctly
  • The <example> blocks show realistic, compilable usage patterns

The PR correctly replaced placeholder comments like "Simplified test context for the new architecture" and "Will be null until initialized by TestOrchestrator" with accurate, user-facing descriptions.

@thomhurst
thomhurst merged commit 53ae75b into main Feb 19, 2026
14 checks passed
@thomhurst
thomhurst deleted the docs/xml-docs branch February 19, 2026 06:58
This was referenced Feb 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

documentation: missing XML docs on core public APIs

1 participant

Morty Proxy This is a proxified and sanitized view of the page, visit original site.