[jOOQ/jOOQ#12053] Add disclaimers about mocking also to Javadoc

This commit is contained in:
Lukas Eder 2021-06-24 10:02:21 +02:00
parent 0930f21f98
commit 3270182be6
7 changed files with 57 additions and 8 deletions

View File

@ -46,6 +46,16 @@ import org.jooq.Result;
/**
* Various utilities related to {@link MockDataProvider}.
* <p>
* <strong>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
* <a href="https://www.testcontainers.org">https://www.testcontainers.org</a>),
* rather than implementing your test database inside of a
* MockDataProvider.</strong>
*
* @author Lukas Eder
*/

View File

@ -74,8 +74,6 @@ import org.jooq.conf.Settings;
import org.jooq.impl.AbstractConfiguration;
import org.jooq.impl.DefaultDSLContext;
import org.jetbrains.annotations.NotNull;
import io.r2dbc.spi.ConnectionFactory;
/**

View File

@ -88,6 +88,16 @@ import java.util.Properties;
* has been optimised for usage with jOOQ. JDBC features that are not used by
* jOOQ (e.g. procedure bind value access by parameter name) are not supported
* in this mock framework
* <p>
* <strong>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
* <a href="https://www.testcontainers.org">https://www.testcontainers.org</a>),
* rather than implementing your test database inside of a
* MockDataProvider.</strong>
*
* @author Lukas Eder
*/

View File

@ -47,6 +47,16 @@ import org.jooq.ConnectionProvider;
* This {@link ConnectionProvider} wraps a delegate
* <code>ConnectionProvider</code> and wraps all acquired {@link Connection}
* references in {@link MockConnection}.
* <p>
* <strong>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
* <a href="https://www.testcontainers.org">https://www.testcontainers.org</a>),
* rather than implementing your test database inside of a
* MockDataProvider.</strong>
*
* @author Lukas Eder
*/

View File

@ -52,14 +52,15 @@ import org.jooq.ResultQuery;
* Supply this data provider to your {@link MockConnection} in order to globally
* provide data for SQL statements.
* <p>
* The general idea of mocking a JDBC connection with this jOOQ API is to
* provide quick workarounds, injection points, etc. using a <em>very
* simple</em> JDBC abstraction (see the {@link #execute(MockExecuteContext)}
* method). It is <em>NOT RECOMMENDED</em> to emulate an entire database
* <strong>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 {@link MockDataProvider}.
* database instead for integration testing (e.g. using
* <a href="https://www.testcontainers.org">https://www.testcontainers.org</a>),
* rather than implementing your test database inside of a
* MockDataProvider.</strong>
* <p>
* See {@link #execute(MockExecuteContext)} for more details.
*

View File

@ -111,6 +111,16 @@ import org.jooq.tools.JooqLogger;
* <li>In the future, other types of result sources will be supported, such as
* CSV, XML, JSON</li>
* </ul>
* <p>
* <strong>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
* <a href="https://www.testcontainers.org">https://www.testcontainers.org</a>),
* rather than implementing your test database inside of a
* MockDataProvider.</strong>
*
* @author Lukas Eder
* @author Samy Deghou

View File

@ -47,6 +47,16 @@ import org.jooq.Source;
/**
* A configuration object for the {@link MockFileDatabase}.
* <p>
* <strong>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
* <a href="https://www.testcontainers.org">https://www.testcontainers.org</a>),
* rather than implementing your test database inside of a
* MockDataProvider.</strong>
*
* @author Lukas Eder
*/