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 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 List<String> |
createStatementsFromFileResource(TestContext context,
SqlUtils.LastScriptLineDecorator lineDecorator)
Reads SQL statements from external file resource.
|
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.
|
List<String> |
getStatements()
Gets the statements.
|
String |
getTransactionIsolationLevel()
Gets the transactionIsolationLevel.
|
org.springframework.transaction.PlatformTransactionManager |
getTransactionManager()
Gets the transactionManager.
|
String |
getTransactionTimeout()
Gets the transactionTimeout.
|
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.
|
void |
setTransactionIsolationLevel(String transactionIsolationLevel)
Sets the transactionIsolationLevel.
|
void |
setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
Sets the transactionManager.
|
void |
setTransactionTimeout(String transactionTimeout)
Sets the transactionTimeout.
|
protected final org.slf4j.Logger log
protected String sqlResourcePath
public AbstractDatabaseConnectingTestAction()
public void execute(TestContext context)
execute
in interface TestAction
public abstract void doExecute(TestContext context)
public boolean isDisabled(TestContext context)
isDisabled
in interface TestAction
context
- the current test context.protected List<String> createStatementsFromFileResource(TestContext context)
context
- the current test context.protected List<String> createStatementsFromFileResource(TestContext context, SqlUtils.LastScriptLineDecorator lineDecorator)
context
- the current test context.public String getDescription()
getDescription
in interface TestAction
public AbstractDatabaseConnectingTestAction setDescription(String description)
setDescription
in interface TestAction
description
- the description to setpublic String getName()
getName
in interface TestAction
public AbstractDatabaseConnectingTestAction setName(String name)
setName
in interface TestAction
public AbstractDatabaseConnectingTestAction setStatements(List<String> statements)
statements
- public AbstractDatabaseConnectingTestAction setSqlResourcePath(String sqlResource)
sqlResource
- public String getSqlResourcePath()
public org.springframework.transaction.PlatformTransactionManager getTransactionManager()
public void setTransactionManager(org.springframework.transaction.PlatformTransactionManager transactionManager)
transactionManager
- public String getTransactionTimeout()
public void setTransactionTimeout(String transactionTimeout)
transactionTimeout
- public String getTransactionIsolationLevel()
public void setTransactionIsolationLevel(String transactionIsolationLevel)
transactionIsolationLevel
- public TestActor getActor()
getActor
in interface TestAction
public AbstractDatabaseConnectingTestAction setActor(TestActor actor)
actor
- the actor to setCopyright © 2008–2017 ConSol Software GmbH. All rights reserved.