Skip to content

Assert class has public constructor #223

@MikeChristensen

Description

@MikeChristensen

Description

It's very cool that Assert is no longer a static class, which allows us to add extension methods and access the singleton "Assert" instance using Assert.That. However, is there a reason why the Assert constructor is public? I'd expect private, or at least Internal.

Steps to reproduce

var a = new Assert();

Expected behavior

I'd expect this not to work.

Actual behavior

Works. But is there a reason why you would ever need/want to do this?

Environment

Latest MSTestV2 on VS2015.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions