use of com.google.api.codegen.MethodConfigProto in project toolkit by googleapis.
the class SampleSpecTest method valueSetsReferencedMultipleTimes.
@Test
public void valueSetsReferencedMultipleTimes() {
final MethodConfigProto methodConfigProto = MethodConfigProto.newBuilder().addSampleValueSets(SampleValueSet.newBuilder().setId("alice")).addSampleValueSets(SampleValueSet.newBuilder().setId("bob")).setSamples(SampleConfiguration.newBuilder().addStandalone(SampleTypeConfiguration.newBuilder().addValueSets("alice").addCallingForms(".*")).addStandalone(SampleTypeConfiguration.newBuilder().addValueSets("bob").addCallingForms(".*")).addStandalone(SampleTypeConfiguration.newBuilder().addValueSets("alice").addCallingForms(".*"))).build();
SampleSpec sampleSpec = new SampleSpec(methodConfigProto);
assertThat(sampleSpec.getSampleConfigs(Collections.singletonList(CallingForm.Request), CallingForm.Request, null, SampleType.STANDALONE)).hasSize(3);
}
Aggregations