This repository has been archived by the owner on Feb 19, 2021. It is now read-only.
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
@amay077 さん ありがとうございます。マージしようとしたのですが、master ブランチのほうで HttpDataService の PutSelfExposureKeysAsync のメソッドシグネチャーが 引数と戻り値の型を変えて、モックのほうの Task.Factory.StartNew の中で HttpStatusCode.OK を return しらもらえるようにしてもらえれば大丈夫だと思います。 |
対応しました! また Debug_Mock を選択したときに Android のデバッグ実行が動作しなかったので、そちらも修正しました。 |
Thanks! |
kazumihirose
pushed a commit
that referenced
this pull request
Jun 22, 2020
[Android/iOS]アプリの通信処理の Mock 化
kazumihirose
pushed a commit
that referenced
this pull request
Jun 22, 2020
[Android/iOS]アプリの通信処理の Mock 化
kazumihirose
pushed a commit
that referenced
this pull request
Jun 22, 2020
[Android/iOS]アプリの通信処理の Mock 化
kazumihirose
pushed a commit
that referenced
this pull request
Jun 22, 2020
[Android/iOS]アプリの通信処理の Mock 化
kazumihirose
pushed a commit
that referenced
this pull request
Jun 22, 2020
[Android/iOS]アプリの通信処理の Mock 化
kazumihirose
pushed a commit
that referenced
this pull request
Jun 22, 2020
[Android/iOS]アプリの通信処理の Mock 化
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Purpose
以下を行いました。
HttpDataService
からインターフェースを切り出してIHttpDataService
を作成するHttpDataService
に依存している箇所(UserDataService
など)は、依存をIHttpDataService
に変えるIHttpDataService
を実装したモッククラスHttpDataServiceMock
を作成するApp.xasml.cs
の依存性の注入で、containerRegistry.RegisterSingleton<HttpDataService>();
の代わりにcontainerRegistry.RegisterSingleton<IHttpDataService, HttpDataService>();
を使用するまた Configuration に Debug_Mock を追加しました。
こちらを選択すると、HttpDataServiceMock が使われ、また ExposureNotification の TestNativeImplementation も使用されます。
Visual Studio 2019
Visual Studio for Mac
Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
What to Check
Verify that the following are valid
Other Information
HttpDataServiceMock.cs
がモックとして何を返却すべきかは、一考の余地があります(とりあえず空っぽい値を返しています)