/** * Creates a test api. The passed temp dir is managed by the caller; in a test, it is usally * created by the TemporaryFolder rule of junit. The passed proto files as well as their imports * must be retrievable via the passed test data locator. */ public TestConfig(TestDataLocator testDataLocator, String tempDir, List<String> protoFiles) { this(testDataLocator, tempDir, protoFiles, ExperimentsImpl.none()); }
public ModelTestInfo buildModel(String... basenames) throws Exception { return buildModel(Arrays.asList(basenames), ExperimentsImpl.none()); }
/** Creates an model where all protos in the descriptor are considered to be sources. */ public static Model create(FileDescriptorSet proto) { DiagCollector diagCollector = new BoundedDiagCollector(); return new Model( proto, null, ExperimentsImpl.none(), ExtensionPool.EMPTY, diagCollector, new DiagSuppressor(diagCollector)); }
/** Creates an model where all protos in the descriptor are considered to be sources. */ public static Model create(FileDescriptorSet proto) { DiagCollector diagCollector = new BoundedDiagCollector(); return new Model( proto, null, ExperimentsImpl.none(), ExtensionPool.EMPTY, diagCollector, new DiagSuppressor(diagCollector)); }
/** * Creates a new model based on the given file descriptor set and list of source file names. The * file descriptor set is self-contained and contains the descriptors for the source files as well * as for all dependencies. */ public static Model create(FileDescriptorSet proto, Iterable<String> sources) { DiagCollector diagCollector = new BoundedDiagCollector(); return new Model( proto, sources, ExperimentsImpl.none(), ExtensionPool.EMPTY, diagCollector, new DiagSuppressor(diagCollector)); }
/** * Creates a new model based on the given file descriptor set and list of source file names. The * file descriptor set is self-contained and contains the descriptors for the source files as well * as for all dependencies. */ public static Model create(FileDescriptorSet proto, Iterable<String> sources) { DiagCollector diagCollector = new BoundedDiagCollector(); return new Model( proto, sources, ExperimentsImpl.none(), ExtensionPool.EMPTY, diagCollector, new DiagSuppressor(diagCollector)); }