public abstract class QueryScenario extends Object
TestProperties.RESULT_MODES.GENERATE
is specifiedModifier and Type | Field and Description |
---|---|
protected QueryReader |
reader |
protected ResultsGenerator |
resultsGen |
Constructor and Description |
---|
QueryScenario(String scenarioName,
Properties queryProperties) |
Modifier and Type | Method and Description |
---|---|
ExpectedResults |
getExpectedResults(String querySetID)
Return the
ExpectedResults for the specified
querySetID . |
Properties |
getProperties()
Return the properties defined for this scenario
|
List<QueryTest> |
getQueries(String querySetID)
Return a
Map containing the query identifier as the key, and
the value is the query. |
QueryReader |
getQueryReader()
Return the
QueryReader that is to be used to obtain the queries
to process. |
String |
getQueryScenarioIdentifier()
Return the identifier for the current scenario
|
Collection<String> |
getQuerySetIDs()
|
String |
getQuerySetName()
Return the name that identifies this query set.
|
ResultsGenerator |
getResultsGenerator()
Return the
ResultsGenerator that is to be used to create new sets
of expected results. |
String |
getResultsMode()
Return the result mode that was defined by the property
TestProperties.PROP_RESULT_MODE |
abstract void |
handleTestResult(TestResult tr,
ResultSet resultSet,
int updateCnt,
boolean resultFromQuery,
String sql) |
protected void |
setUp() |
protected void |
validateResultsMode(Properties props) |
protected QueryReader reader
protected ResultsGenerator resultsGen
public QueryScenario(String scenarioName, Properties queryProperties)
protected void setUp()
protected void validateResultsMode(Properties props)
public String getQuerySetName()
TestProperties.QUERY_SET_NAME
property to obtain the name.public String getQueryScenarioIdentifier()
public Properties getProperties()
public List<QueryTest> getQueries(String querySetID)
Map
containing the query identifier as the key, and
the value is the query. In most simple cases, the query will be a
String
However, complex types (i.e., to execute prepared
statements or other arguments), it maybe some other type.querySetID
- identifies a set of queriespublic Collection<String> getQuerySetIDs()
Collection
of querySetID
s that the
QueryReader
will be providing. The querySetID
can be
used to obtain it associated set of queries by call
getQueries(String)
public String getResultsMode()
TestProperties.PROP_RESULT_MODE
public ExpectedResults getExpectedResults(String querySetID)
ExpectedResults
for the specified
querySetID
. These expected results will be used to compare
with the actual results in order to determine success or failure.querySetID
- public ResultsGenerator getResultsGenerator()
ResultsGenerator
that is to be used to create new sets
of expected results.public QueryReader getQueryReader()
QueryReader
that is to be used to obtain the queries
to process.public abstract void handleTestResult(TestResult tr, ResultSet resultSet, int updateCnt, boolean resultFromQuery, String sql)
Copyright © 2019. All rights reserved.