2023-07-16 11:06:48 +00:00
|
|
|
package com.gmgauthier.cucumber;
|
2023-07-16 09:28:02 +00:00
|
|
|
|
2023-07-16 11:06:48 +00:00
|
|
|
import com.gmgauthier.JsonUtils;
|
2023-07-16 09:28:02 +00:00
|
|
|
import io.cucumber.datatable.DataTable;
|
|
|
|
import io.cucumber.java.en.Given;
|
2023-07-16 11:06:48 +00:00
|
|
|
import io.cucumber.junit.platform.engine.Cucumber;
|
2023-07-16 09:28:02 +00:00
|
|
|
import kong.unirest.json.JSONObject;
|
|
|
|
|
2023-07-16 11:06:48 +00:00
|
|
|
@Cucumber
|
2023-07-19 09:17:00 +00:00
|
|
|
public class MyStepDefTests {
|
2023-07-16 09:28:02 +00:00
|
|
|
@Given("The following data in a table")
|
|
|
|
public void theFollowingDataInATable(DataTable dataTable) {
|
2023-07-19 09:17:00 +00:00
|
|
|
JSONObject dataTableAsJson = JsonUtils.getJsonFromDataTable(dataTable);
|
2023-07-16 09:28:02 +00:00
|
|
|
System.out.println(dataTableAsJson);
|
|
|
|
}
|
|
|
|
}
|