use of com.sequenceiq.cloudbreak.blueprint.testrepeater.TestFile in project cloudbreak by hortonworks.
the class ReadTestData method getInputOutputData.
public static List<BlueprintDataProvider> getInputOutputData(Map<String, BlueprintPreparationObject> models) throws IOException {
final List<BlueprintDataProvider> testFiles = new LinkedList<>();
for (Map.Entry<String, BlueprintPreparationObject> entry : models.entrySet()) {
try {
TestFile inputFile = getTestFile(getFileName(BLUEPRINT_UPDATER_TEST_INPUTS, entry.getKey()));
TestFile outputFile = getTestFile(getFileName(BLUEPRINT_UPDATER_TEST_OUTPUTS, entry.getKey()));
testFiles.add(new BlueprintDataProvider(inputFile, outputFile, entry.getValue()));
} catch (Exception ex) {
throw new IOException(String.format("Unable to locate the desired folder/file in the classpath <%s>, message: %s", entry.getKey(), ex.getMessage()));
}
}
return testFiles;
}
Aggregations