Fix ResultSet mock wasNull function
Added the option of use number formatters at ResultSetHelperService
Added the option of use number formatters at ResultSetHelperService.
It seems to me that it has gone too far away from the original intend and scope of this collaboration to this project. IMHO, I don't think is a good idea to use a concrete implementation of a database in unit tests, I think it's better to mock the expected behaviour, as it is now, beside this edge case I detected. Also, the change you are proposing is a huge refactor that I don't have the time or the will to achive. So, I deeply thought about it all and I decided to change my strategy: I have rewitten...
Yes, that is.
Hello Andrew, I'm afraid this is taking more trouble than it was intended ... I'm sorry for that. Also, for some reason, I cannot see you commit on the merge request (in fact I neither can see mine anymore), I'll check again later, and complete my answer as needed. I understand your concerns, but as for my understanding it all ends on the inconsistencies with the mock for the wasNull method, as mentioned earlier. I explain: I made the change in the boolean test because it was not reflecting the reality...
Hello Andew, thanks for your feedback. I Missed the if (rs.wasNull() || value == null) { ... } at the end of function getColumnValue, so I thought it was not being checked, so the code as it was would work ok, it is just checking 2 times if the value is null. I made a bit of cleaning to avoid this in today's commit. While I was at it, I also added a protected method handleBoolean to allow boolean conversion personalization by extending the ResultSetHelperService class, using the same approach already...
Sorry, I was wrong about the bug, my bad. The rest still applies.