CommunityToolkit / CommunityToolkit/dotnet

Fix unit tests assertion parameters for expected and actual values

オープン
#55 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る
主要言語
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

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

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