Hi !

I'm trying to setup unit tests with jOOQ using MockDataProvider and 
MockConnection.
I'm having issues setting up a simple unit test where my query does not 
return a simple Record.

The documentation http://www.jooq.org/doc/3.2/manual/tools/jdbc-mocking/ 
uses the following:

            Result<AuthorRecord> result = create.newResult(AUTHOR);
            result.add(create.newRecord(AUTHOR));
            result.get(0).setValue(AUTHOR.ID, 1);
            result.get(0).setValue(AUTHOR.LAST_NAME, "Orwell");
            mock[0] = new MockResult(1, result); 

 
However, if my jOOQ query is a simple 

create.select(DSL.count()).from(AUTHOR))

How should I mock the result? I cannot use create.newResult(?)since the 
count isn't a Field in any Record.
I haven't found a simple way to create a MockResult instance based on a 
bunch of fields that are not part of a Record object.
Are there any examples of this online?

Thanks !
Guillaume

-- 
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.

Reply via email to