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