Hi there. It's very unlikely if not impossible that DefaultDSLContext.newRecord() returns null. Neither does values() return null, it returns "this", so the same, modified record reference. You mentioned you're mocking things so perhaps something went wrong in your mocks or in your instrumentations? Can you please check again?
Thanks, Lukas On Wed, Oct 31, 2018 at 3:50 PM <[email protected]> wrote: > Hey, folks. > > I am having an issue when add a mock unit test. > > I have a table which is DIGITAL_USER_COLLECTION, and right now I am trying > to mock a unit test that will return one record. > > Record3<Integer, Integer,Byte> record = > dslContext.newRecord(DIGITAL_USER_COLLECTION.USR_ID, > DIGITAL_USER_COLLECTION.ITEM_ID, > DIGITAL_USER_COLLECTION.RATING).values(24, 25, (byte)26); > > > However, when I was trying to create the record with this statement, the > returned value of newRecord() is null, so the "record" here is null. > > FYI, I defined dslContext with : > > DSLContext dslContext = DSL.using(SQLDialect.MARIADB); > > > Thanks, > > > > > > > > > -- > You received this message because you are subscribed to the Google Groups > "jOOQ User Group" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to [email protected]. > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "jOOQ User Group" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
