use of com.google.api.generator.gapic.model.GapicClass in project gapic-generator-java by googleapis.
the class GrpcServiceStubClassComposerTest method generateGrpcServiceStubClass_httpBindingsWithSubMessageFields.
@Test
public void generateGrpcServiceStubClass_httpBindingsWithSubMessageFields() {
GapicContext context = GrpcTestProtoLoader.instance().parsePubSubPublisher();
Service service = context.services().get(0);
GapicClass clazz = GrpcServiceStubClassComposer.instance().generate(context, service);
Assert.assertGoldenClass(this.getClass(), clazz, "GrpcPublisherStub.golden");
Assert.assertEmptySamples(clazz.samples());
}
use of com.google.api.generator.gapic.model.GapicClass in project gapic-generator-java by googleapis.
the class GrpcServiceStubClassComposerTest method generateGrpcServiceStubClass_deprecated.
@Test
public void generateGrpcServiceStubClass_deprecated() {
GapicContext context = GrpcTestProtoLoader.instance().parseDeprecatedService();
Service protoService = context.services().get(0);
GapicClass clazz = GrpcServiceStubClassComposer.instance().generate(context, protoService);
Assert.assertGoldenClass(this.getClass(), clazz, "GrpcDeprecatedServiceStub.golden");
Assert.assertEmptySamples(clazz.samples());
}
use of com.google.api.generator.gapic.model.GapicClass in project gapic-generator-java by googleapis.
the class GrpcServiceStubClassComposerTest method generateGrpcServiceStubClass_createBatchingCallable.
@Test
public void generateGrpcServiceStubClass_createBatchingCallable() {
GapicContext context = GrpcTestProtoLoader.instance().parseLogging();
Service service = context.services().get(0);
GapicClass clazz = GrpcServiceStubClassComposer.instance().generate(context, service);
Assert.assertGoldenClass(this.getClass(), clazz, "GrpcLoggingStub.golden");
Assert.assertEmptySamples(clazz.samples());
}
use of com.google.api.generator.gapic.model.GapicClass in project gapic-generator-java by googleapis.
the class MockServiceImplClassComposerTest method generateMockServiceImplClasses.
@Test
public void generateMockServiceImplClasses() {
Service service = context.services().get(0);
GapicClass clazz = MockServiceImplClassComposer.instance().generate(context, service);
Assert.assertGoldenClass(this.getClass(), clazz, name + ".golden");
Assert.assertEmptySamples(clazz.samples());
}
use of com.google.api.generator.gapic.model.GapicClass in project gapic-generator-java by googleapis.
the class ServiceClientTestClassComposerTest method generateServiceClientTestClasses.
@Test
public void generateServiceClientTestClasses() {
Service echoProtoService = context.services().get(serviceIndex);
GapicClass clazz = ServiceClientTestClassComposer.instance().generate(context, echoProtoService);
Assert.assertGoldenClass(this.getClass(), clazz, name + ".golden");
Assert.assertEmptySamples(clazz.samples());
}
Aggregations