Module org.jooq

Interface MockDataProvider

All Known Implementing Classes:
Functional Interface:
This is a functional interface and can therefore be used as the assignment target for a lambda expression or method reference.

@FunctionalInterface public interface MockDataProvider
A data provider for mock query executions.

Supply this data provider to your MockConnection in order to globally provide data for SQL statements.

Disclaimer: The general idea of mocking a JDBC connection with this jOOQ API is to provide quick workarounds, injection points, etc. using a very simple JDBC abstraction. It is NOT RECOMMENDED to emulate an entire database (including complex state transitions, transactions, locking, etc.) using this mock API. Once you have this requirement, please consider using an actual database instead for integration testing (e.g. using, rather than implementing your test database inside of a MockDataProvider.

See execute(MockExecuteContext) for more details.

Lukas Eder
See Also:
  • Method Summary

    Modifier and Type
    Execution callback for a JDBC query execution.