use of com.google.api.codegen.configgen.DiscoConfigGeneratorApi in project toolkit by googleapis.
the class DiscoConfigGenerationTest method run.
@Override
public String run() throws Exception {
String outFile = tempDir.getRoot().getPath() + File.separator + baselineFileName();
String discoveryFile = getTestDataLocator().findTestData(discoveryFileName).getFile();
ToolOptions options = ToolOptions.create();
options.set(DiscoConfigGeneratorApi.OUTPUT_FILE, outFile);
options.set(DiscoConfigGeneratorApi.DISCOVERY_DOC, discoveryFile);
new DiscoConfigGeneratorApi(options).run();
return new String(Files.readAllBytes(Paths.get(outFile)), StandardCharsets.UTF_8);
}
Aggregations