SetterTester and GetterTester improvement#90
SetterTester and GetterTester improvement#90rcriosbr wants to merge 2 commits intoOpenPojo:masterfrom rcriosbr:master
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.
How about supplying skipped fields via constructor?
SetterTester setterTester = new SetterTester(String... skippedFields);
konrad7d
left a comment
There was a problem hiding this comment.
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.