-
Notifications
You must be signed in to change notification settings - Fork 40
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
SetterTester and GetterTester improvement #90
base: master
Are you sure you want to change the base?
Conversation
validation. Sometimes when build unit tests for legacy code, you can find bad programming from people that put business logic inside getter/setter. And, since you cannot refactor it, OpenPojo fails. To avoid skipping the entire class because a field, this modification helps it.
validation. Sometimes when build unit tests for legacy code, you can find bad programming from people that put business logic inside getter/setter. And, since you cannot refactor it, OpenPojo fails. To avoid skipping the entire class because a field, this modification helps it.
public void test() { | ||
PojoClass personPojo = PojoClassFactory.getPojoClass(Person.class); | ||
|
||
SetterTester setterTester = new SetterTester(); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How about supplying skipped fields via constructor?
SetterTester setterTester = new SetterTester(String... skippedFields);
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like this pull request. I've noticed, it's quite old though. Is there anything stopping us from merging it?
Hi all, Why this use full PR isnot merged? |
@oshoukry - any thoughts on including something like this into the next release? |
See issue 66 for other comments relevant to this enhancement as well as a workaround until this or a similar change makes it into the code base. |
Hi @oshoukry , could you please give a statement whether or not this PR will make it to the baseline? So please let us know what to do to enhance OpenPojo. Sincerely |
Improved SetterTester and GetterTester classes which introduces the possibility of jump / skip some fields during the validation class.