Podam Utils: Problem with filing boolean data.
Hi, thank you for your library, its so helpful in unit testing. However, I noticed problem with using boolean fields: I try to generate class using podamFactory.manufacturePojo(Test.class);
i have class:
public class Test{ private boolean visible;
public boolean setVisible(boolean visible){this.visible = visible;} public boolean isVisible(){ return visible;} }
There are also other fields, with other types, but boolean fields causes problem: java.lang.NoSuchMethodException - no getter for field Visible. I see framework is trying to use getVisible - but for booleans i use isFieldName
I could not find similar issue, if it is not valid, please let me know
This could be helpful: class Test is generic, and is created using
Test
Hi Daniil, maybe we can make a change in Podam that for booleans it considers both getXXX and isXXX methods?
Regards,
On 15 Dec 2014, at 09:36, Bartosz Kraszewski [email protected] wrote:
Hi, thank you for your library, its so helpfull in unit testing. Hovewer, I noticed problem with using boolean fields:
i have class:
public class Test{ private boolean visible;
public boolean setVisible(boolean visible){this.visible = visible;} public boolean isVisible(){ return visible;} }
There are also other fields, with other types, but boolean fields causes problem: java.lang.NoSuchMethodException - no getter for field Visible. I see framework is trying to use getVisible - but for booleans i use isFieldName
I could not find similar issue, if it is not valid, please let me know
— Reply to this email directly or view it on GitHub https://github.com/mtedone/podam/issues/68.
Sure. But I still have issues with access rights to sonatype.org.
Have you tried the setup mentioned at this page? http://central.sonatype.org/pages/apache-maven.html http://central.sonatype.org/pages/apache-maven.html
Regards, M.
On 17 Dec 2014, at 21:52, Daniil Ivanov [email protected] wrote:
Sure. But I still have issues with access rights to sonatype.org.
— Reply to this email directly or view it on GitHub https://github.com/mtedone/podam/issues/68#issuecomment-67401452.
So basically there are two observations.
This exception is logged at INFO level and is not a problem per se and cause no effect on the presented POJO population. We should not log exception traces for issues, which are just merely a notification for the user.
But getter discovery is used for fining annotations and were this getter be annotated, PODAm would not find it. I will make a test ensuring now this works as expected.
Bartosz, could you please verify the issue against latest PODAM release?
Closing.