Class JdbiOtjPostgresExtension

java.lang.Object
org.jdbi.v3.testing.junit5.JdbiExtension
org.jdbi.v3.testing.junit5.JdbiOtjPostgresExtension
All Implemented Interfaces:
AfterAllCallback, AfterEachCallback, BeforeAllCallback, BeforeEachCallback, Extension, ParameterResolver

public class JdbiOtjPostgresExtension extends JdbiExtension
Jdbi PostgreSQL JUnit 5 rule using the otj-pg-embedded component. Override methods for special case construction:

     @RegisterExtension
     public JdbiExtension extension = new JdbiOtjPostgresExtension() {
         @Override
         protected DataSource createDataSource() {
            ...
         }
     };
 
Use with ExtendWith:

 @ExtendWith(JdbiOtjPostgresExtension.class)
 public class DatabaseTest {
     @Test
     public void testWithJdbi(Jdbi jdbi) {
         ...
     }

     @Test
     public void testWithHandle(Handle handle) {
         ...
     }
 }