Class AutoConfigureForTesting

java.lang.Object
io.ebean.test.config.AutoConfigureForTesting
All Implemented Interfaces:
io.ebean.config.AutoConfigure

public class AutoConfigureForTesting extends Object implements io.ebean.config.AutoConfigure
Automatically configure ServerConfig for testing purposes.

Can setup and execute docker based databases and other containers. Can setup DataSource configuration (to match docker db setup). Can setup a CurrentUserProvider and CurrentTenantProvider for testing. Can setup a EncryptKeyManager for testing purposes with fixed key.

  • Constructor Details

    • AutoConfigureForTesting

      public AutoConfigureForTesting()
  • Method Details

    • preConfigure

      public void preConfigure(io.ebean.DatabaseBuilder builder)
      Specified by:
      preConfigure in interface io.ebean.config.AutoConfigure
    • postConfigure

      public void postConfigure(io.ebean.DatabaseBuilder builder)
      Specified by:
      postConfigure in interface io.ebean.config.AutoConfigure