Skip to content

Document where IApplyToContext attributes may be placed - #1274

Merged
SeanKilleen merged 1 commit into
masterfrom
322_iapplytocontext-applies-to
Oct 22, 2026
Merged

SeanKilleen merged 1 commit into
masterfrom
322_iapplytocontext-applies-to

Conversation

@SeanKilleen

Copy link
Copy Markdown
Member

Follow-up from the ICommandWrapper discussion: adds a section to the IApplyToContext page stating that NUnit applies these attributes at method, fixture and assembly level, what each level affects, and that the usable levels are governed by each attribute's own AttributeUsage (with an example for custom attributes). Contrasts this with ICommandWrapper, which only works on test methods.

Verified against SimpleWorkItem.MakeTestCommand (method-level) and CompositeWorkItem.MakeOneTimeSetUpCommand (fixture and assembly level) in the framework source.

Fixes #322

🤖 Generated with Claude Code

Follow-up from the `ICommandWrapper` discussion: adds a section to the `IApplyToContext` page stating that NUnit applies these attributes at method, fixture and assembly level, what each level affects, and that the usable levels are governed by each attribute's own `AttributeUsage` (with an example for custom attributes). Contrasts this with `ICommandWrapper`, which only works on test methods.

Verified against `SimpleWorkItem.MakeTestCommand` (method-level) and `CompositeWorkItem.MakeOneTimeSetUpCommand` (fixture and assembly level) in the framework source.

Fixes #322

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 22, 2026 •

Copy link
Copy Markdown

📖 Docs preview removed because this PR was closed.

@SeanKilleen
SeanKilleen merged commit 4619ae3 into master Oct 22, 2026
6 checks passed
@SeanKilleen
SeanKilleen deleted the 322_iapplytocontext-applies-to branch October 22, 2026 13:51
github-actions Bot pushed a commit that referenced this pull request Oct 22, 2026
Follow-up from the `ICommandWrapper` discussion: adds a section to the `IApplyToContext` page stating that NUnit applies these attributes at method, fixture and assembly level, what each level affects, and that the usable levels are governed by each attribute's own `AttributeUsage` (with an example for custom attributes). Contrasts this with `ICommandWrapper`, which only works on test methods.

Verified against `SimpleWorkItem.MakeTestCommand` (method-level) and `CompositeWorkItem.MakeOneTimeSetUpCommand` (fixture and assembly level) in the framework source.

Fixes #322

Co-authored-by: Claude Fable 5.1 <noreply@anthropic.com> 4619ae3
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.

ICommandWrapper documentation should say where attribute must be applied

2 participants