Package org.tentackle.pdo.test
Class DbTestUtilities
java.lang.Object
org.tentackle.pdo.test.DbTestUtilities
Low-level session utility methods for tests.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreatePopulateScript(org.tentackle.dbms.Db db) Creates the SQL script to populate the database.
Used for in-memory test connections.
Loads the model from the classpath.static DbTestUtilitiesThe singleton.voidRuns an SQL script.
-
Constructor Details
-
DbTestUtilities
public DbTestUtilities()
-
-
Method Details
-
getInstance
The singleton.- Returns:
- the singleton
-
createPopulateScript
Creates the SQL script to populate the database.
Used for in-memory test connections.
Loads the model from the classpath.- Parameters:
db- the low-level database session- Returns:
- the SQL script
- Throws:
ModelException- if model is inconsistent- See Also:
-
runScript
Runs an SQL script.- Parameters:
db- the low-level sessionscript- the SQL script
-