Package io.virtualan.cucumblan.core
Class DBBaseStepDefinition
- java.lang.Object
-
- io.virtualan.cucumblan.core.DBBaseStepDefinition
-
public class DBBaseStepDefinition extends Object
The type JDBC base step definition.- Author:
- Elan Thangamani
-
-
Constructor Summary
Constructors Constructor Description DBBaseStepDefinition()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidbefore(io.cucumber.java.Scenario scenario)Before.voiddummyGiven(String dummy)given sql.voidinsertSql(String dummy, String resource, List<String> sqls)Insert sql.static voidloadAllDataSource()voidmodifyBooleanVariable(String condition)perform the skip scenariovoidselect(String dummy1, String dummy, String resource, List<String> selectSql)SELECT.voidstoreSqlResponseAskey(String responseKey, String key)voidstoreSqlResponseAskeySwap(String key, String responseKey)voidverify(String dummy1, String dummy, String resource, List<String> selectSql)Verify.
-
-
-
Method Detail
-
loadAllDataSource
public static void loadAllDataSource()
-
before
public void before(io.cucumber.java.Scenario scenario)
Before.- Parameters:
scenario- the scenario
-
dummyGiven
@Given("as a user perform query (.*) action$") @Given("as a user perform sql (.*) action$") public void dummyGiven(String dummy) throws Exceptiongiven sql.- Parameters:
dummy- the dummy- Throws:
Exception- the exception
-
insertSql
@Given("execute DDL for the given query (.*) on (.*)$") @Given("execute UPDATE for the given query (.*) on (.*)$") @Given("execute DELETE for the given query (.*) on (.*)$") @Given("execute INSERT for the given query (.*) on (.*)$") @Given("execute DDL for the given sql (.*) on (.*)$") @Given("execute UPDATE for the given (.*) on (.*)$") @Given("execute DELETE for the given (.*) on (.*)$") @Given("execute INSERT for the given (.*) on (.*)$") public void insertSql(String dummy, String resource, List<String> sqls) throws ExceptionInsert sql.- Parameters:
dummy- the dummyresource- the resourcesqls- the sqls- Throws:
Exception- the exception
-
modifyBooleanVariable
@Given("^perform-db the (.*) condition to skip scenario") public void modifyBooleanVariable(String condition) throws Exceptionperform the skip scenario- Parameters:
condition- the response value excel based- Throws:
IOException- the io exceptionException
-
storeSqlResponseAskeySwap
@Given("^store (.*) as key and query\'s (.*) as value") public void storeSqlResponseAskeySwap(String key, String responseKey) throws org.json.JSONException- Throws:
org.json.JSONException
-
storeSqlResponseAskey
@Given("^store-sql\'s (.*) value of the key as (.*)") public void storeSqlResponseAskey(String responseKey, String key) throws org.json.JSONException- Throws:
org.json.JSONException
-
verify
@Given("verify (.*) with the given sql (.*) on (.*)$") @Given("validate (.*) given (.*) on (.*)$") public void verify(String dummy1, String dummy, String resource, List<String> selectSql) throws ExceptionVerify.- Parameters:
dummy1- the dummy 1dummy- the dummyresource- the resourceselectSql- the select sql- Throws:
Exception- the exception
-
select
@Given("select (.*) with the given sql (.*) on (.*)$") @Given("read (.*) given (.*) on (.*)$") public void select(String dummy1, String dummy, String resource, List<String> selectSql) throws ExceptionSELECT.- Parameters:
dummy1- the dummy 1dummy- the dummyresource- the resourceselectSql- the select sql- Throws:
Exception- the exception
-
-