Search in sources :

Example 1 with PreparationContent

use of org.talend.dataprep.qa.dto.PreparationContent in project data-prep by Talend.

the class FilterStep method doApplyFilterOnPreparation.

private void doApplyFilterOnPreparation(String tql, String preparationName) throws IOException {
    PreparationContent preparationContent = getPreparationContent(preparationName, tql);
    context.storeObject("preparationContent", preparationContent);
}
Also used : PreparationContent(org.talend.dataprep.qa.dto.PreparationContent)

Example 2 with PreparationContent

use of org.talend.dataprep.qa.dto.PreparationContent in project data-prep by Talend.

the class ActionStep method iDisableTheLastStepsOfThePreparation.

@When("^I disable the last \"(.*)\" steps of the preparation \"(.*)\"$")
public void iDisableTheLastStepsOfThePreparation(int nbStepsToDisable, String prepName) throws Throwable {
    // Get steps in order to retrieve the id of the nth last one
    String prepId = context.getPreparationId(suffixName(prepName));
    List<String> steps = getPreparationDetails(prepId).steps;
    assertTrue("Not enough steps in the preparation to disable", steps.size() > nbStepsToDisable);
    String version = steps.get(steps.size() - nbStepsToDisable - 1);
    Response response = api.getPreparationContent(prepId, version, "HEAD", null);
    response.then().statusCode(OK.value());
    PreparationContent preparationContent = response.as(PreparationContent.class);
    context.storeObject("preparationContent", preparationContent);
}
Also used : Response(com.jayway.restassured.response.Response) PreparationContent(org.talend.dataprep.qa.dto.PreparationContent) When(cucumber.api.java.en.When)

Example 3 with PreparationContent

use of org.talend.dataprep.qa.dto.PreparationContent in project data-prep by Talend.

the class FilterStep method checkFilterAppliedOnPreparation.

@Then("^The characteristics of the preparation \"(.*)\" match:$")
public void checkFilterAppliedOnPreparation(String preparationName, DataTable dataTable) throws Exception {
    PreparationContent preparationContent = (PreparationContent) context.getObject("preparationContent");
    if (preparationContent == null) {
        preparationContent = getPreparationContent(preparationName, null);
    }
    checkContent(preparationContent, dataTable);
}
Also used : PreparationContent(org.talend.dataprep.qa.dto.PreparationContent) Then(cucumber.api.java.en.Then)

Aggregations

PreparationContent (org.talend.dataprep.qa.dto.PreparationContent)3 Response (com.jayway.restassured.response.Response)1 Then (cucumber.api.java.en.Then)1 When (cucumber.api.java.en.When)1