CommunityToolkit / CommunityToolkit/dotnet

Fix unit tests assertion parameters for expected and actual values

Open
#55 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
C#
Stars
3.8k
Forks
400
PR merge metrics
No merged PRs in 30d

Description

## 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)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.