public abstract class AbstractDatabaseConnectingTestAction extends org.springframework.jdbc.core.support.JdbcDaoSupport implements TestAction
JdbcDaoSupport providing
access to a DataSource.| Modifier and Type | Field and Description |
|---|---|
protected org.slf4j.Logger |
log
Logger
|
protected static String |
SQL_COMMENT
Constant representing SQL comment
|
protected String |
sqlResourcePath
SQL file resource path
|
protected List<String> |
statements
List of SQL statements
|
| Constructor and Description |
|---|
AbstractDatabaseConnectingTestAction() |
| Modifier and Type | Method and Description |
|---|---|
protected List<String> |
createStatementsFromFileResource(TestContext context)
Reads SQL statements from external file resource.
|
protected String |
decorateLastScriptLine(String line)
Subclasses may want to decorate last script line.
|
abstract void |
doExecute(TestContext context)
Subclasses may add custom execution logic here.
|
void |
execute(TestContext context)
Do basic logging and delegate execution to subclass.
|
TestActor |
getActor()
Gets the actor.
|
String |
getDescription()
Gets this action's description.
|
String |
getName()
Gets the name of the test action.
|
String |
getSqlResourcePath()
Gets the sqlResource.
|
protected String |
getStatemendEndingCharacter()
Gets the SQL statement ending character sequence.
|
List<String> |
getStatements()
Gets the statements.
|
boolean |
isDisabled(TestContext context)
Checks if this test action is disabled.
|
AbstractDatabaseConnectingTestAction |
setActor(TestActor actor)
Sets the actor.
|
AbstractDatabaseConnectingTestAction |
setDescription(String description)
Sets this test action's description.
|
AbstractDatabaseConnectingTestAction |
setName(String name)
Sets this test action's name.
|
AbstractDatabaseConnectingTestAction |
setSqlResourcePath(String sqlResource)
Setter for external file resource containing the SQL statements to execute.
|
AbstractDatabaseConnectingTestAction |
setStatements(List<String> statements)
List of statements to execute.
|
protected final org.slf4j.Logger log
protected String sqlResourcePath
protected static final String SQL_COMMENT
public AbstractDatabaseConnectingTestAction()
public void execute(TestContext context)
execute in interface TestActionpublic abstract void doExecute(TestContext context)
public boolean isDisabled(TestContext context)
isDisabled in interface TestActioncontext - the current test context.protected List<String> createStatementsFromFileResource(TestContext context)
context - the current test context.protected String getStatemendEndingCharacter()
protected String decorateLastScriptLine(String line)
line - the last script line finishing a SQL statement.public String getDescription()
getDescription in interface TestActionpublic AbstractDatabaseConnectingTestAction setDescription(String description)
setDescription in interface TestActiondescription - the description to setpublic String getName()
getName in interface TestActionpublic AbstractDatabaseConnectingTestAction setName(String name)
setName in interface TestActionpublic AbstractDatabaseConnectingTestAction setStatements(List<String> statements)
statements - public AbstractDatabaseConnectingTestAction setSqlResourcePath(String sqlResource)
sqlResource - public String getSqlResourcePath()
public TestActor getActor()
getActor in interface TestActionpublic AbstractDatabaseConnectingTestAction setActor(TestActor actor)
actor - the actor to setCopyright © 2008–2015 ConSol* Consulting&Solutions GmbH. All rights reserved.