use of com.google.api.generator.gapic.model.GapicClass in project gapic-generator-java by googleapis.
the class GrpcServiceCallableFactoryClassComposerTest method generateServiceClasses_deprecated.
@Test
public void generateServiceClasses_deprecated() {
GapicContext context = GrpcTestProtoLoader.instance().parseDeprecatedService();
Service protoService = context.services().get(0);
GapicClass clazz = GrpcServiceCallableFactoryClassComposer.instance().generate(context, protoService);
Assert.assertGoldenClass(this.getClass(), clazz, "GrpcDeprecatedServiceCallableFactory.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_routingHeaders.
@Test
public void generateGrpcServiceStubClass_routingHeaders() {
GapicContext context = GrpcTestProtoLoader.instance().parseExplicitDynamicRoutingHeaderTesting();
Service service = context.services().get(0);
GapicClass clazz = GrpcServiceStubClassComposer.instance().generate(context, service);
Assert.assertGoldenClass(this.getClass(), clazz, "GrpcRoutingHeadersStub.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_simple.
@Test
public void generateGrpcServiceStubClass_simple() {
GapicContext context = GrpcTestProtoLoader.instance().parseShowcaseEcho();
Service echoProtoService = context.services().get(0);
GapicClass clazz = GrpcServiceStubClassComposer.instance().generate(context, echoProtoService);
Assert.assertGoldenClass(this.getClass(), clazz, "GrpcEchoStub.golden");
Assert.assertEmptySamples(clazz.samples());
}
use of com.google.api.generator.gapic.model.GapicClass in project gapic-generator-java by googleapis.
the class MockServiceClassComposerTest method generateMockServiceClasses.
@Test
public void generateMockServiceClasses() {
Service service = context.services().get(0);
GapicClass clazz = MockServiceClassComposer.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 ServiceClientClassComposerTest method generateServiceClientClasses.
@Test
public void generateServiceClientClasses() {
Service service = context.services().get(0);
GapicClass clazz = ServiceClientClassComposer.instance().generate(context, service);
Assert.assertGoldenClass(this.getClass(), clazz, name + ".golden");
Assert.assertGoldenSamples(this.getClass(), name, clazz.classDefinition().packageString(), clazz.samples());
}
Aggregations