public class SqlInterface extends Object
| Modifier and Type | Field and Description |
|---|---|
static Connection |
conn |
| Constructor and Description |
|---|
SqlInterface() |
| Modifier and Type | Method and Description |
|---|---|
static void |
connectDb() |
static void |
DataBaseInterface(ServiceObject apiObject)
/* (String TestSuite, String TestCaseID, String RunFlag, String Description,
String InterfaceType, String UriPath, String ContentType, String Method,
String Option, String RequestHeaders, String TemplateFile, String
RequestBody, String OutputParams, String RespCodeExp, String
ExpectedResponse, String ExpectedResponse, String NotExpectedResponse,
String TcComments, String tcName, String tcIndex)
interface for database api calls
|
static ResultSet |
evaluateDbQuery(ServiceObject apiObject)
evaluaes the sql statement
|
static void |
evaluateReponse(ServiceObject apiObject,
ResultSet resSet)
evaluate the response
|
static ResultSet |
executeAndWaitForDbResponse(PreparedStatement sqlStmt,
ServiceObject apiObject)
executes And waits for response calls the query in each loop does not wait if
expected or partial expected response are empty
|
static void |
validateExpectedResponse(String expected,
ResultSet resSet) |
public static Connection conn
public static void DataBaseInterface(ServiceObject apiObject) throws Exception
apiObject - Exceptionpublic static void connectDb()
Exceptionpublic static ResultSet evaluateDbQuery(ServiceObject apiObject) throws Exception
apiObject - Exceptionpublic static void evaluateReponse(ServiceObject apiObject, ResultSet resSet) throws Exception
apiObject - resSet - Exceptionpublic static ResultSet executeAndWaitForDbResponse(PreparedStatement sqlStmt, ServiceObject apiObject) throws SQLException
sqlStmt - apiObject - SQLExceptionpublic static void validateExpectedResponse(String expected, ResultSet resSet) throws SQLException
SQLExceptionCopyright © 2019. All rights reserved.