Class SpincastTestingPostgres
java.lang.Object
org.spincast.testing.core.postgres.SpincastTestingPostgres
- All Implemented Interfaces:
com.google.inject.Provider<SpincastDataSource>
,javax.inject.Provider<SpincastDataSource>
public class SpincastTestingPostgres
extends Object
implements com.google.inject.Provider<SpincastDataSource>
-
Field Summary
-
Constructor Summary
ConstructorDescriptionSpincastTestingPostgres
(SpincastTestingPostgresConfig spincastTestingPostgresConfig, JdbcUtils jdbcUtils, SpincastDataSourceFactory spincastDataSourceFactory) -
Method Summary
Modifier and TypeMethodDescriptionvoid
Clears the whole database.get()
int
int
protected JdbcUtils
protected com.opentable.db.postgres.embedded.EmbeddedPostgres
getPg()
protected int
protected SpincastDataSourceFactory
protected SpincastTestingPostgresConfig
void
init()
protected boolean
void
Stops Postgres.
-
Field Details
-
logger
protected static final org.slf4j.Logger logger
-
-
Constructor Details
-
SpincastTestingPostgres
@Inject public SpincastTestingPostgres(SpincastTestingPostgresConfig spincastTestingPostgresConfig, JdbcUtils jdbcUtils, SpincastDataSourceFactory spincastDataSourceFactory)
-
-
Method Details
-
getPg
protected com.opentable.db.postgres.embedded.EmbeddedPostgres getPg() -
getSpincastTestingPostgresConfig
-
getJdbcUtils
-
getSpincastDataSourceFactory
-
init
@Inject public void init() -
isLogCredentials
protected boolean isLogCredentials() -
getPortToUse
protected int getPortToUse() -
get
- Specified by:
get
in interfacecom.google.inject.Provider<SpincastDataSource>
- Specified by:
get
in interfacejavax.inject.Provider<SpincastDataSource>
-
getDbConnectionString
-
getDbPort
public int getDbPort() -
getDbName
-
getDbUsername
-
getDbPassword
-
getDbMaxPoolSize
public int getDbMaxPoolSize() -
stopPostgres
public void stopPostgres()Stops Postgres. -
clearDatabase
public void clearDatabase()Clears the whole database.
-