Skip to content

Move Throw Assertions from the TUnit.Assertions.AssertConditions.Throws namespace to TUnit.Assertions or TUnit.Assertions.Extensions for consistency with other assertions #2561

@robertcoltheart

Description

@robertcoltheart

Small quibble, but whenever we use Assert.That and an assertion extension, for example, IsEqualTo, the implicit usings cover this, and no special using statement is needed.

But when doing Assert.That(() => myFunc()).Throws<Exception>(), intellisense adds the TUnit.Assertions.AssertConditions.Throws namespace using.

Is it possible to add this namespace to the TUnit.Assertions.targets file for a cleaner test file?

Metadata

Metadata

Assignees

Labels

No labels
No labels

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions