com.google.firebase.auth.UserRecord.CreateRequest doesn't override .equals making it hard to test
まだ誰も着手していません。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 55/100
- issue の種類
- バグ
- 明瞭さ
- 明確に書かれている
- 活発さ
- 停滞
- 技術スタック
- java
調査の方向性
まず、com.google.firebase.auth.UserRecord.CreateRequest とエントリーポイント createUserAsync(CreateRequest request) を探します。既存の認証テストを確認し、その後、同じ payload を持つ2つのリクエストが期待どおりに比較されることと、Mockito ベースのテストが null の結果を受け取らなくなっていることを確認します。
索引モデルが issue の本文から書いたものです。
説明
[READ] Step 1: Are you in the right place?
- For issues or feature requests related to the code in this repository
file a Github issue.- If this is a feature request make sure the issue title starts with "FR:".
- For general technical questions, post a question on StackOverflow
with the firebase tag. - For general Firebase discussion, use the firebase-talk
google group. - For help troubleshooting your application that does not fall under one
of the above categories, reach out to the personalized
Firebase support channel.
[REQUIRED] Step 2: Describe your environment
- Operating System version: _____
- Firebase SDK version: _____
- Library version: _____
- Firebase Product: _____ (auth, database, storage, etc)
[REQUIRED] Step 3: Describe the problem
Steps to reproduce:
What happened? How can we make the problem occur?
This could be a description, log/console output, etc.
Relevant Code:
// TODO(you): code here to reproduce the problem
I built an application with a function that call firebaseAuth.createUserAsync(CreateRequest request). To test the logic in this function, I created a unit test for it with a mock:
CreateRequest createRequest = // creates some request
UserRecord userRecord = // build a record
FirebaseAuth auth = mock(FirebaseAuth.class);
when(auth.createUserAsync(createRequest)).thenReturn(ApiFutures.immediateFuture(userRecord))
but when I ran the test I got a Null Pointer Exception from Mockito. On further inspection, I realized that two instances of CreateRequest with the same payload value return false when compared via .equals. This leads Mockito to think the function is not defined for this argument.
I am happy to contribute this simple (probably IntelliJ-generated) code, is there a reason you don't want this in there?
- 主要言語
- Java
- スター
- 620
- フォーク
- 305
- 平均マージ
- 4日 9時間
- マージ済み PR(30日)
- 4
コントリビューションガイド
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
firebase/firebase-admin-java のほかの issue
-
難易度 4/5 3〜5日 初心者へのやさしさ 48/100
firebase/firebase-admin-java#1231 ·
-
api: core
firebase/firebase-admin-java#1198 · コメント 3 件 · 担当者 1 名 ·
-
api: remoteconfig
firebase/firebase-admin-java#1196 · コメント 1 件 · 担当者 2 名 ·
-
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
firebase/firebase-admin-java#1192 · コメント 3 件 ·
-
needs-triage type: feature request
難易度 3/5 1〜2日 初心者へのやさしさ 45/100
firebase/firebase-admin-java#1149 · コメント 1 件 ·
firebase/firebase-admin-java の issue をすべて見る
似ている issue
-
awaiting triage bug Causes friction Hop Gui P1 P2 Transforms
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
apache/flink-agents#1152 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
-
難易度 2/5 1〜3時間 初心者へのやさしさ 70/100
jenkinsci/blueocean-plugin#5417 ·
-
難易度 2/5 1〜3時間 初心者へのやさしさ 75/100
objectionary/eo-graphs#75 ·