Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Assert class has public constructor #223

Closed
MikeChristensen opened this issue Jul 10, 2017 · 2 comments
Closed

Assert class has public constructor #223

MikeChristensen opened this issue Jul 10, 2017 · 2 comments
Milestone

Comments

@MikeChristensen
Copy link

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.

@AbhitejJohn
Copy link
Contributor

Thanks for filing this @MikeChristensen . This should be private and sealed.

@AbhitejJohn
Copy link
Contributor

Fixed.

@khilangoel khilangoel added this to the S121 milestone Aug 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants