org.teiid.test.client
Interface ExpectedResults

All Known Implementing Classes:
ExpectedResultsImpl, XMLExpectedResults

public interface ExpectedResults

An ExpectedResults represents one set of expected results (referred to as the queryset) identified by the getQuerySetID(). The queryidentifier identify a unique query and corresponds to the expected results file.

Author:
vanhalbert

Field Summary
static java.lang.String PROP_EXPECTED_RESULTS_DIR_LOC
          The results location is where expected result files can be found
static java.lang.String PROP_EXPECTED_RESULTS_ROOT_DIR
          PROP_EXPECTED_RESULTS_ROOT_DIR, if specified, indicates the root directory to be prepended to the PROP_EXPECTED_RESULTS_DIR_LOC to create the full directory to find the expected results files.
 
Method Summary
 java.lang.Object compareResults(java.lang.String queryIdentifier, java.lang.String sql, java.sql.ResultSet resultSet, java.lang.Throwable actualException, int testStatus, boolean isOrdered, int updateCnt, boolean resultFromQuery)
          Called to compare the ResultSet from the executed query to the expected results and return the errors.
 java.lang.Object getMetaData(java.lang.String queryidentifier)
           
 java.lang.String getQuerySetID()
          Return the unique identifier for this query set.
 java.io.File getResultsFile(java.lang.String queryidentifier)
          Returns the File location for the actual results for the specified query identifier.
 boolean isExceptionExpected(java.lang.String queryidentifier)
          Indicates if a query expects to have an Exception to be thrown when the query is executed.
 

Field Detail

PROP_EXPECTED_RESULTS_DIR_LOC

static final java.lang.String PROP_EXPECTED_RESULTS_DIR_LOC
The results location is where expected result files can be found

See Also:
Constant Field Values

PROP_EXPECTED_RESULTS_ROOT_DIR

static final java.lang.String PROP_EXPECTED_RESULTS_ROOT_DIR
PROP_EXPECTED_RESULTS_ROOT_DIR, if specified, indicates the root directory to be prepended to the PROP_EXPECTED_RESULTS_DIR_LOC to create the full directory to find the expected results files. This property is normally used during the nightly builds so that the query files will coming from other projects.

See Also:
Constant Field Values
Method Detail

getQuerySetID

java.lang.String getQuerySetID()
Return the unique identifier for this query set.

Returns:

getResultsFile

java.io.File getResultsFile(java.lang.String queryidentifier)
                            throws QueryTestFailedException
Returns the File location for the actual results for the specified query identifier.

Parameters:
queryidentifier -
Returns:
File location for actual results for the specified query
Throws:
QueryTestFailedException
Since:

isExceptionExpected

boolean isExceptionExpected(java.lang.String queryidentifier)
                            throws QueryTestFailedException
Indicates if a query expects to have an Exception to be thrown when the query is executed.

Parameters:
queryidentifier -
Returns:
boolean true if the query expects an exception to be thrown
Throws:
QueryTestFailedException

getMetaData

java.lang.Object getMetaData(java.lang.String queryidentifier)

compareResults

java.lang.Object compareResults(java.lang.String queryIdentifier,
                                java.lang.String sql,
                                java.sql.ResultSet resultSet,
                                java.lang.Throwable actualException,
                                int testStatus,
                                boolean isOrdered,
                                int updateCnt,
                                boolean resultFromQuery)
                                throws QueryTestFailedException
Called to compare the ResultSet from the executed query to the expected results and return the errors.

Parameters:
queryIdentifier -
sql -
resultSet -
actualException -
testStatus -
isOrdered -
updateCnt -
Returns:
Object identifying the errors in the comparison
Throws:
QueryTestFailedException


Copyright © 2010. All Rights Reserved.