googleapis / googleapis/google-cloud-java

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

オープン
#12,510 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
priority: p3 type: feature request
主要言語
Java
スター
2.1k
フォーク
1.2k
平均マージ
1日 23時間
マージ済み PR(30日)
154

説明

**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.

コントリビューションガイド

コントリビューションガイドを開く

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。