use of com.google.api.tools.framework.model.testing.TestConfig in project toolkit by googleapis.
the class SampleInitCodeTest method setupClass.
@Before
public void setupClass() {
List<String> protoFiles = Lists.newArrayList("myproto.proto");
List<String> yamlFiles = Lists.newArrayList("myproto.yaml");
testDataLocator = TestDataLocator.create(SampleInitCodeTest.class);
testConfig = new TestConfig(testDataLocator, tempDir.getRoot().getPath(), protoFiles);
model = testConfig.createModel(yamlFiles);
StandardSetup.registerStandardProcessors(model);
StandardSetup.registerStandardConfigAspects(model);
model.establishStage(Merged.KEY);
apiInterface = model.getSymbolTable().getInterfaces().asList().get(0);
method = apiInterface.getMethods().get(0);
}
use of com.google.api.tools.framework.model.testing.TestConfig in project toolkit by googleapis.
the class CodegenTestUtil method readModel.
public static Model readModel(TestDataLocator locator, TemporaryFolder tempDir, String[] protoFiles, String[] yamlFiles) {
TestConfig testConfig = new TestConfig(locator, tempDir.getRoot().getPath(), Arrays.asList(protoFiles));
Model model = testConfig.createModel(Arrays.asList(yamlFiles));
StandardSetup.registerStandardProcessors(model);
StandardSetup.registerStandardConfigAspects(model);
model.establishStage(Merged.KEY);
return model;
}
Aggregations