-
-
Notifications
You must be signed in to change notification settings - Fork 683
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
add constructor assertions for ClassAssert #1693
Comments
I would likely split |
that's probably fine, hmm could have |
Does this issue mean that we need to test whether a class have a private or protected or public constructor? I want to fix this issue |
sorry...... |
Thinking out loud, would it make sense to introduce assertions for And Something like: assertThat(MyClass.class).getConstructor() // default constructor
.isPublic();
assertThat(MyClass.class).getConstructor(Integer.class, String.class)
.isPackagePrivate(); |
But one class could have multiple constructors, these constructors may be private, protected, or public. |
|
The This is actually a second step. It would be enough to have assertThat(MyClass.class.getDeclaredConstructor()).isPublic(); |
Both |
Sorry I make a mistake, |
Sorry..... |
@xenoterracide @wettera we discussed the topic internally and we would prefer a separate |
nope, though you might consider allowing chaining from the class assert, that way it's easily discoverable, but I'll leave that up to you. Since my biggest priority was to ensure that I had a public noargs constructor. |
Yes, chaining is definitely in the roadmap |
Hi Guys, Can you guide me how can i contribute here |
Example
I'm not fussy on names
The text was updated successfully, but these errors were encountered: