CommunityToolkit / CommunityToolkit/dotnet
Fix unit tests assertion parameters for expected and actual values
- Vorherrschende Sprache
- C#
- Sterne
- 3.8k
- Forks
- 400
- PR-Merge-Kennzahlen
- Keine gemergten PRs in 30 T.
Beschreibung
## 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)
Beitragsleitfaden
Rechercherichtung
Start with tests/CommunityToolkit.Mvvm.UnitTests/Test_ICommandAttribute.cs and inspect the Assert calls referenced by the issue. Review the unit-test suite for reversed expected and actual parameters, then run the relevant tests to confirm the assertion ordering is corrected throughout.
Vom Indexierungsmodell aus dem Issue-Text verfasst.
Bewertung
- Tech-Stack
- csharp
- Bereich
- testing
- Issue-Typ
- Refactoring
- Schwierigkeit
- 3/5
- Geschätzter Aufwand
- 1-2 Tage
- Aktivitätsstatus
- Veraltet
- Klarheit
- Größtenteils klar
- Anfängerfreundlichkeit
- 35/100