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.

    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.

    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 (see the execute(MockExecuteContext) method). 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, rather than implementing your test database inside of a MockDataProvider.

    See execute(MockExecuteContext) for more details.

    Lukas Eder
    See Also: