public class RestDataProvider extends CommonDataProvider implements DataInputProvider, DataOutputProvider
| Modifier and Type | Class and Description |
|---|---|
static class |
RestDataProvider.types |
CommonDataProvider.ResultColumnNamesDataProvider.typecolumns, dataInPath, dataOutPath, indexData, resultColumnName, scenarioName| Constructor and Description |
|---|
RestDataProvider(String type,
String host,
String port)
Constructor of REST DataProvider.
|
| Modifier and Type | Method and Description |
|---|---|
int |
getNbLines()
Gets the number of readable lines of current opened file.
|
void |
prepare(String scenario) |
String[] |
readLine(int line,
boolean readResult) |
String |
readValue(String column,
int line)
Reads a cell of opened input file.
|
protected void |
setHttpService(HttpService httpService)
HttpService setter for mock
|
protected void |
writeValue(String column,
int line,
String value)
Defines how to write values.
|
getIndexData, getModel, getNbGherkinExample, getResultColumnName, isResultColumnNameAuthorized, setDataInPath, setDataOutPath, setIndexData, writeDataResult, writeFailedResult, writeSuccessResult, writeWarningResultclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitwriteDataResult, writeFailedResult, writeSuccessResult, writeWarningResultgetIndexData, getModel, getNbGherkinExample, getResultColumnName, isResultColumnNameAuthorized, setDataInPath, setDataOutPath, setIndexDatapublic RestDataProvider(String type, String host, String port) throws WebServicesException
type - (JSON or XML).host - is host of REST Web Services.port - is port of REST Web Services.WebServicesException - if technical Exception occurred but for a Web Services.public void prepare(String scenario) throws TechnicalException
prepare in interface DataProviderTechnicalExceptionpublic int getNbLines()
getNbLines in interface DataInputProviderpublic String readValue(String column, int line)
readValue in interface DataInputProvidercolumn - index of the column to readline - index of the line to readpublic String[] readLine(int line, boolean readResult)
readLine in interface DataInputProviderline - id of the line to read (line=0 for reading headers ; line=1 for reading 1st line, ...)readResult - true if result must be returned, false otherwiseprotected void writeValue(String column, int line, String value)
writeValue in class CommonDataProvidercolumn - The column nameline - The line numbervalue - The value to writeprotected void setHttpService(HttpService httpService)
httpService - The HTTP ServiceCopyright © 2023 NoraUi. All rights reserved.