Skip to content

Remove ClassCleanupBehavior.EndOfAssembly option #1541

@Evangelink

Description

@Evangelink

Summary

MSTest offers the ability to chose if ClassCleanup method should be called at the end of the class or at the end of the assembly.

Background and Motivation

It's not clear why such behaviour was offered knowing it's already possible to define a AssemblyCleanup method that will be called at the end of the assembly. Besides, the behaviour is confusing as it's the default behaviour for ClassCleanup which is counter-intuitive and seems absolutely redundant.

Looking at the code, the only feature provided by EndOfAssembly is to allow to define multiple cleanup methods to be called at the end of the assembly while AssemblyCleanup allows for only one such method to be defined per assembly. If there is a strong requirement for such behaviour, we could instead relax the rule for AssemblyCleanup.

Proposed Feature

Deprecate EndOfAssembly entry and remove it (along with the enum) in some future version.

Alternative Designs

None.

AB#1732088

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions