Search in sources :

Example 1 with ExportSampleStep

use of org.talend.dataprep.qa.step.export.ExportSampleStep in project data-prep by Talend.

the class ExportPreparationStep method whenIExportThePreparationWithCustomParametersInto.

@When("^I export the preparation with parameters :$")
public void whenIExportThePreparationWithCustomParametersInto(Map<String, String> params) throws IOException {
    ExportType exportType = epAnalyzer.detectExportType(params);
    ExportSampleStep exporter = epAnalyzer.getExporter(exportType);
    if (exporter == null) {
        Assert.fail("No exporter available for " + exportType.getName() + " export type.");
    }
    exporter.exportSample(params);
}
Also used : ExportSampleStep(org.talend.dataprep.qa.step.export.ExportSampleStep) ExportType(org.talend.dataprep.qa.util.export.ExportType) When(cucumber.api.java.en.When)

Example 2 with ExportSampleStep

use of org.talend.dataprep.qa.step.export.ExportSampleStep in project data-prep by Talend.

the class ExportPreparationStep method whenIExportThePreparationWithCustomParametersInto.

@When("^I export the preparation with parameters :$")
public void whenIExportThePreparationWithCustomParametersInto(DataTable dataTable) throws IOException {
    Map<String, String> params = dataTable.asMap(String.class, String.class);
    ExportType exportType = epAnalyzer.detectExportType(params);
    ExportSampleStep exporter = epAnalyzer.getExporter(exportType);
    if (exporter == null) {
        Assert.fail("No exporter available for " + exportType.getName() + " export type.");
    }
    exporter.exportSample(params);
}
Also used : ExportSampleStep(org.talend.dataprep.qa.step.export.ExportSampleStep) ExportType(org.talend.dataprep.qa.util.export.ExportType) When(cucumber.api.java.en.When)

Aggregations

When (cucumber.api.java.en.When)2 ExportSampleStep (org.talend.dataprep.qa.step.export.ExportSampleStep)2 ExportType (org.talend.dataprep.qa.util.export.ExportType)2