Merge branch '2.0.x'

This commit is contained in:
Stephane Nicoll
2018-06-04 17:36:01 +02:00
3 changed files with 28 additions and 3 deletions

View File

@@ -30,6 +30,8 @@ import org.jooq.RecordType;
import org.jooq.RecordUnmapper;
import org.jooq.RecordUnmapperProvider;
import org.jooq.SQLDialect;
import org.jooq.TransactionListener;
import org.jooq.TransactionListenerProvider;
import org.jooq.TransactionalRunnable;
import org.jooq.VisitListener;
import org.jooq.VisitListenerProvider;
@@ -56,6 +58,7 @@ import static org.junit.Assert.fail;
* @author Phillip Webb
* @author Andy Wilkinson
* @author Stephane Nicoll
* @author Dmytro Nosan
*/
public class JooqAutoConfigurationTests {
@@ -137,8 +140,8 @@ public class JooqAutoConfigurationTests {
this.contextRunner.withUserConfiguration(JooqDataSourceConfiguration.class,
TxManagerConfiguration.class, TestRecordMapperProvider.class,
TestRecordUnmapperProvider.class, TestRecordListenerProvider.class,
TestExecuteListenerProvider.class, TestVisitListenerProvider.class)
.run((context) -> {
TestExecuteListenerProvider.class, TestVisitListenerProvider.class,
TestTransactionListenerProvider.class).run((context) -> {
DSLContext dsl = context.getBean(DSLContext.class);
assertThat(dsl.configuration().recordMapperProvider().getClass())
.isEqualTo(TestRecordMapperProvider.class);
@@ -150,6 +153,8 @@ public class JooqAutoConfigurationTests {
.isEqualTo(2);
assertThat(dsl.configuration().visitListenerProviders().length)
.isEqualTo(1);
assertThat(dsl.configuration().transactionListenerProviders().length)
.isEqualTo(1);
});
}
@@ -273,4 +278,14 @@ public class JooqAutoConfigurationTests {
}
protected static class TestTransactionListenerProvider
implements TransactionListenerProvider {
@Override
public TransactionListener provide() {
return null;
}
}
}