Skip to content

Allow specifying additional SetUp/TearDown methods.#923

Merged
manfred-brands merged 2 commits intomasterfrom
Issue921_AdditionalSetupTearDownMethods
Oct 7, 2025
Merged

Allow specifying additional SetUp/TearDown methods.#923
manfred-brands merged 2 commits intomasterfrom
Issue921_AdditionalSetupTearDownMethods

Conversation

@manfred-brands
Copy link
Copy Markdown
Member

Fixes #921

The methods must be overrides and it is expected that they are called by the base class.

The methods must be overrides and it is expected that they are called by the base class.
Copy link
Copy Markdown
Member

@mikkelbu mikkelbu left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we should also mention this in the docs - otherwise I'm happy to merge it. E.g. something like (inserted after ## Extending the list of names of disposing methods

## Specifying additional SetUp and TearDown methods

It is also possible to specify additional SetUp and TearDown methods using the configurations
`dotnet_diagnostic.NUnit1032.additional_setup_methods` and `dotnet_diagnostic.NUnit1032.additional_teardown_methods`
in the `.editorconfig`. This allow the user to specify overridden methods that will be called by SetUp and TearDown methods
in the base class.

@mikkelbu mikkelbu added this to the Release 4.11 milestone Oct 6, 2025
@manfred-brands manfred-brands force-pushed the Issue921_AdditionalSetupTearDownMethods branch from 66ff34b to 7d02154 Compare October 6, 2025 23:51
@manfred-brands
Copy link
Copy Markdown
Member Author

Thanks @mikkelbu, documentation updated.

@manfred-brands manfred-brands merged commit db43195 into master Oct 7, 2025
6 checks passed
@manfred-brands manfred-brands deleted the Issue921_AdditionalSetupTearDownMethods branch October 7, 2025 02:06
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.

NUnit1032 - disposals in overridden methods not detected

3 participants