diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.0.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.0.xml index 77735f441c..bbaa62a889 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.0.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.0.xml @@ -9893,9 +9893,13 @@ create.selectFrom(AUTHOR)
JDBC mocking for unit testing -

- When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. -

+

+ When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a simple database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. +

+ +

+ 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, rather than implementing your test database inside of a MockDataProvider. +

Mocking the JDBC API

diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.1.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.1.xml index 08f50e7110..c3eb26d08a 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.1.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.1.xml @@ -10398,9 +10398,13 @@ create.selectFrom(AUTHOR)

JDBC mocking for unit testing -

- When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. -

+

+ When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a simple database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. +

+ +

+ 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, rather than implementing your test database inside of a MockDataProvider. +

Mocking the JDBC API

diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.2.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.2.xml index 9a8216afeb..1c834a8a31 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.2.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.2.xml @@ -11119,9 +11119,13 @@ create.selectFrom(AUTHOR)

JDBC mocking for unit testing -

- When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. -

+

+ When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a simple database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. +

+ +

+ 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, rather than implementing your test database inside of a MockDataProvider. +

Mocking the JDBC API

diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml index 1f54b00df3..69fa1a4af6 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.3.xml @@ -12016,9 +12016,13 @@ create.selectFrom(AUTHOR)

JDBC mocking for unit testing -

- When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. -

+

+ When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a simple database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. +

+ +

+ 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, rather than implementing your test database inside of a MockDataProvider. +

Mocking the JDBC API

diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml index 3c49f33cf2..ce7faa72f6 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.4.xml @@ -13177,9 +13177,13 @@ create.selectFrom(AUTHOR)

JDBC mocking for unit testing -

- When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. -

+

+ When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a simple database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. +

+ +

+ 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, rather than implementing your test database inside of a MockDataProvider. +

Mocking the JDBC API

diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml index 346a52133a..123d8ea8e8 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.5.xml @@ -13881,9 +13881,13 @@ public class PostgresJSONGsonBinding implements Binding {

JDBC mocking for unit testing -

- When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. -

+

+ When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a simple database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. +

+ +

+ 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, rather than implementing your test database inside of a MockDataProvider. +

Mocking the JDBC API

diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml index 8a533ec7df..16b7f784a6 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.6.xml @@ -14767,9 +14767,13 @@ public class Book {

JDBC mocking for unit testing -

- When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. -

+

+ When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a simple database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. +

+ +

+ 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, rather than implementing your test database inside of a MockDataProvider. +

Mocking the JDBC API

diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml index 58416c9079..42d176f311 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.7.xml @@ -15147,9 +15147,13 @@ public class Book {

JDBC mocking for unit testing -

- When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. -

+

+ When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a simple database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. +

+ +

+ 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, rather than implementing your test database inside of a MockDataProvider. +

Mocking the JDBC API

diff --git a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml index 09093be48f..e4841968d5 100644 --- a/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml +++ b/jOOQ-manual/src/main/resources/org/jooq/web/manual-3.8.xml @@ -15295,9 +15295,13 @@ public class Book { JDBC mocking for unit testing

- When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ. + When writing unit tests for your data access layer, you have probably used some generic mocking tool offered by popular providers like Mockito, jmock, mockrunner, or even DBUnit. With jOOQ, you can take advantage of the built-in JDBC mock API that allows you to emulate a simple database on the JDBC level for precisely those SQL/JDBC use cases supported by jOOQ.

+

+ 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, rather than implementing your test database inside of a MockDataProvider. +

+

Mocking the JDBC API

JDBC is a very complex API. It takes a lot of time to write a useful and correct mock implementation, implementing at least these interfaces: diff --git a/jOOQ/src/main/java/org/jooq/tools/jdbc/MockDataProvider.java b/jOOQ/src/main/java/org/jooq/tools/jdbc/MockDataProvider.java index 9a2c85a1f0..c355538a7e 100644 --- a/jOOQ/src/main/java/org/jooq/tools/jdbc/MockDataProvider.java +++ b/jOOQ/src/main/java/org/jooq/tools/jdbc/MockDataProvider.java @@ -55,7 +55,16 @@ import org.jooq.ResultQuery; * Supply this data provider to your {@link MockConnection} in order to globally * provide data for SQL statements. *

- * See {@link #execute(MockExecuteContext)} for details. + * 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 {@link #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 {@link MockDataProvider}. + *

+ * See {@link #execute(MockExecuteContext)} for more details. * * @author Lukas Eder * @see MockConnection @@ -72,19 +81,19 @@ public interface MockDataProvider { * statement execution methods. These include: *

*

    - *
  • {@link Statement#execute(String)}
  • - *
  • {@link Statement#execute(String, int)}
  • - *
  • {@link Statement#execute(String, int[])}
  • - *
  • {@link Statement#execute(String, String[])}
  • - *
  • {@link Statement#executeBatch()}
  • - *
  • {@link Statement#executeQuery(String)}
  • - *
  • {@link Statement#executeUpdate(String)}
  • - *
  • {@link Statement#executeUpdate(String, int)}
  • - *
  • {@link Statement#executeUpdate(String, int[])}
  • - *
  • {@link Statement#executeUpdate(String, String[])}
  • - *
  • {@link PreparedStatement#execute()}
  • - *
  • {@link PreparedStatement#executeQuery()}
  • - *
  • {@link PreparedStatement#executeUpdate()}
  • + *
  • {@link Statement#execute(String)}
  • + *
  • {@link Statement#execute(String, int)}
  • + *
  • {@link Statement#execute(String, int[])}
  • + *
  • {@link Statement#execute(String, String[])}
  • + *
  • {@link Statement#executeBatch()}
  • + *
  • {@link Statement#executeQuery(String)}
  • + *
  • {@link Statement#executeUpdate(String)}
  • + *
  • {@link Statement#executeUpdate(String, int)}
  • + *
  • {@link Statement#executeUpdate(String, int[])}
  • + *
  • {@link Statement#executeUpdate(String, String[])}
  • + *
  • {@link PreparedStatement#execute()}
  • + *
  • {@link PreparedStatement#executeQuery()}
  • + *
  • {@link PreparedStatement#executeUpdate()}
  • *
*

* The various execution modes are unified into this simple method. @@ -132,9 +141,9 @@ public interface MockDataProvider { * relevant flag is passed from MockStatement to any of these * properties: *

    - *
  • {@link MockExecuteContext#autoGeneratedKeys()}
  • - *
  • {@link MockExecuteContext#columnIndexes()}
  • - *
  • {@link MockExecuteContext#columnNames()}
  • + *
  • {@link MockExecuteContext#autoGeneratedKeys()}
  • + *
  • {@link MockExecuteContext#columnIndexes()}
  • + *
  • {@link MockExecuteContext#columnNames()}
  • *
* *
  • OUT parameters from stored procedures are generated from the first