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

Skip testing setters for Enums #216

Open
niravmsh opened this issue Oct 27, 2017 · 1 comment
Open

Skip testing setters for Enums #216

niravmsh opened this issue Oct 27, 2017 · 1 comment

Comments

@niravmsh
Copy link

Having setters in Enums is considered a bad practice and flagged by systems like PMD
There is no way to skip Setter checks on Enum at the moment
Specially when Enums are nested inside other pojos which are been tested for Setters

@sta-szek sta-szek changed the title pojo-tester does not skip "Setter" check for enums Skip testing setters for Enums Oct 28, 2017
@sta-szek
Copy link
Owner

sta-szek commented Dec 16, 2017

I agree, in the future we can skip testing setter for enums by default. For now you can workaround this in simple way method(EQUALS, HASH_CODE, GETTER, TO_STRING, CONSTRUCTOR) so I wont prioritize this issue.

But @niravmsh you are welcome to implement this now.

You can even think about including / excluding tests for methods e.g.:

testMethods(EQUALS) / includeTestsFor(EQUALS) / include(EQUALS)
doNotTestMethods(EQUALS) / excludeTestsFor(EQUALS) / exclude(EQUALS)

It will be nice improvement to pojo-tester

Thanks!

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

2 participants