Skip to content

Commit

Permalink
fix: Use the right composers in deprecation unit tests (#715)
Browse files Browse the repository at this point in the history
  • Loading branch information
miraleung authored Apr 21, 2021
1 parent 42dedef commit 2318136
Show file tree
Hide file tree
Showing 10 changed files with 453 additions and 990 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void generateServiceClasses() {
public void generateServiceClasses_deprecated() {
GapicContext context = TestProtoLoaderUtil.parseDeprecatedService();
Service protoService = context.services().get(0);
GapicClass clazz = ServiceClientClassComposer.instance().generate(context, protoService);
GapicClass clazz = MockServiceClassComposer.instance().generate(context, protoService);

JavaWriterVisitor visitor = new JavaWriterVisitor();
clazz.classDefinition().accept(visitor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void generateServiceClasses() {
public void generateServiceClasses_deprecated() {
GapicContext context = TestProtoLoaderUtil.parseDeprecatedService();
Service protoService = context.services().get(0);
GapicClass clazz = ServiceClientClassComposer.instance().generate(context, protoService);
GapicClass clazz = MockServiceImplClassComposer.instance().generate(context, protoService);

JavaWriterVisitor visitor = new JavaWriterVisitor();
clazz.classDefinition().accept(visitor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void generateServiceClasses() {
public void generateServiceClasses_deprecated() {
GapicContext context = TestProtoLoaderUtil.parseDeprecatedService();
Service protoService = context.services().get(0);
GapicClass clazz = ServiceClientClassComposer.instance().generate(context, protoService);
GapicClass clazz = ServiceSettingsClassComposer.instance().generate(context, protoService);

JavaWriterVisitor visitor = new JavaWriterVisitor();
clazz.classDefinition().accept(visitor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ public void generateServiceClasses() {
public void generateServiceClasses_deprecated() {
GapicContext context = TestProtoLoaderUtil.parseDeprecatedService();
Service protoService = context.services().get(0);
GapicClass clazz = ServiceClientClassComposer.instance().generate(context, protoService);
GapicClass clazz = ServiceStubClassComposer.instance().generate(context, protoService);

JavaWriterVisitor visitor = new JavaWriterVisitor();
clazz.classDefinition().accept(visitor);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ public void generateServiceStubSettingsClasses_basic() throws IOException {
public void generateServiceStubSettingsClasses_deprecated() throws IOException {
GapicContext context = TestProtoLoaderUtil.parseDeprecatedService();
Service protoService = context.services().get(0);
GapicClass clazz = ServiceClientClassComposer.instance().generate(context, protoService);
GapicClass clazz = ServiceStubSettingsClassComposer.instance().generate(context, protoService);

JavaWriterVisitor visitor = new JavaWriterVisitor();
clazz.classDefinition().accept(visitor);
Expand Down
Loading

0 comments on commit 2318136

Please sign in to comment.