Wrong logic for the testUserAddCommentWithNoID?

I believe that testUserAddCommentWithNoID test in UpdateCreateCommentTest is wrong.
It is expected to throw IncorrectDaoOperation exception on attempt to insert a comment with no predefined id. But why should it? Isn’t _id inserted by database automatically?
I got the validation code for the ticket Create/Update Comments successfully - I just disabled this particular test. I believe that running the unit tests has nothing to do with getting the validation code - they are there just for self-check.
Please comment

1 Like