CommunityToolkit / CommunityToolkit/dotnet
Fix unit tests assertion parameters for expected and actual values
オープン
- 主要言語
- C#
- スター
- 3.8k
- フォーク
- 400
- PR マージ指標
- 30日以内にマージされた PR はありません
説明
## Expected behavior
In unit tests, `Assert` methods such as `Assert.AreEqual(value, otherValue)` should have the first parameter be the expected value, second parameter the actual value.
## Current behavior
Some correct usage, mostly backwards. [Example](https://github.com/CommunityToolkit/dotnet/blob/main/tests/CommunityToolkit.Mvvm.UnitTests/Test_ICommandAttribute.cs#L20)
コントリビューションガイド
調査の方向性
tests/CommunityToolkit.Mvvm.UnitTests/Test_ICommandAttribute.cs から始め、issue で参照されている Assert 呼び出しを確認します。単体テストスイートで expected パラメーターと actual パラメーターが逆になっていないか確認し、その後、該当するテストを実行して、アサーションの順序が全体で修正されていることを確認します。
索引モデルが issue の本文から書いたものです。
評価
- 技術スタック
- csharp
- 領域
- testing
- issue の種類
- リファクタリング
- 難易度
- 3/5
- 見積もり時間
- 1〜2日
- 活発さ
- 停滞
- 明瞭さ
- おおむね明確
- 初心者へのやさしさ
- 35/100