Skip to content

TreatDiscoveryWarningsAsErrors should throw instead of sending message #5992

@Youssef1313

Description

@Youssef1313

logger.SendMessage(treatDiscoveryWarningsAsErrors ? TestMessageLevel.Error : TestMessageLevel.Warning, message);

To guarantee that the error will end up failing the test run, we should throw an exception.

Metadata

Metadata

Labels

Area: MSTestIssues with MSTest that are not specific to more refined area (e.g. analyzers or assertions)

Type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions