Class SpincastTestingPostgres

java.lang.Object
org.spincast.testing.core.postgres.SpincastTestingPostgres
All Implemented Interfaces:
com.google.inject.Provider<org.spincast.plugins.jdbc.SpincastDataSource>, javax.inject.Provider<org.spincast.plugins.jdbc.SpincastDataSource>

public class SpincastTestingPostgres extends Object implements com.google.inject.Provider<org.spincast.plugins.jdbc.SpincastDataSource>
  • Field Details

    • logger

      protected static final org.slf4j.Logger logger
  • Constructor Details

    • SpincastTestingPostgres

      @Inject public SpincastTestingPostgres(SpincastTestingPostgresConfig spincastTestingPostgresConfig, org.spincast.plugins.jdbc.JdbcUtils jdbcUtils, org.spincast.plugins.jdbc.SpincastDataSourceFactory spincastDataSourceFactory)
  • Method Details

    • getPg

      protected com.opentable.db.postgres.embedded.EmbeddedPostgres getPg()
    • getSpincastTestingPostgresConfig

      protected SpincastTestingPostgresConfig getSpincastTestingPostgresConfig()
    • getJdbcUtils

      protected org.spincast.plugins.jdbc.JdbcUtils getJdbcUtils()
    • getSpincastDataSourceFactory

      protected org.spincast.plugins.jdbc.SpincastDataSourceFactory getSpincastDataSourceFactory()
    • init

      @Inject public void init()
    • isLogCredentials

      protected boolean isLogCredentials()
    • getPortToUse

      protected int getPortToUse()
    • get

      public org.spincast.plugins.jdbc.SpincastDataSource get()
      Specified by:
      get in interface com.google.inject.Provider<org.spincast.plugins.jdbc.SpincastDataSource>
      Specified by:
      get in interface javax.inject.Provider<org.spincast.plugins.jdbc.SpincastDataSource>
    • getDbConnectionString

      public String getDbConnectionString()
    • getDbPort

      public int getDbPort()
    • getDbName

      public String getDbName()
    • getDbUsername

      public String getDbUsername()
    • getDbPassword

      public String getDbPassword()
    • getDbMaxPoolSize

      public int getDbMaxPoolSize()
    • stopPostgres

      public void stopPostgres()
      Stops Postgres.
    • clearDatabase

      public void clearDatabase()
      Clears the whole database.