googleapis / googleapis/google-cloud-java

[sdk-platform-java] Client libraries should be mockable for testing

Đang mở
#12,510 0 bình luận 0 reaction 0 người được giao Xem trên GitHub
priority: p3 type: feature request
Ngôn ngữ chính
Java
Star
2.1k
Fork
1.2k
Merge trung bình
1 ngày 23 giờ
Pull request đã merge (30 ngày)
154

Mô tả

**Is your feature request related to a problem? Please describe.**
I am attempting to write JUnit tests for my code that integrates with Dialogflow CX. However, the `SessionsClient` does not implement a service interface, and the business methods (particularly `detectIntent(DetectIntentRequest)`) are all `final`. This means that it is impossible to use a test double, either a JDK interface proxy or a CGLib subclass.

**Describe the solution you'd like**
The service APIs should implement a business service interface that can be mocked.

**Describe alternatives you've considered**
No alternatives considered; this is fundamental baseline functionality for an integration library.

Hướng dẫn đóng góp

Mở hướng dẫn đóng góp

Đánh giá

Issue này chưa được đánh giá.

Nhận issue mới trong hộp thư của bạn

Bản tóm tắt ngắn những issue GitHub phù hợp với người mới.