You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
[TestCase(1, 42)]
[TestCase(2, 42)]
public void Example(int value1, int value2)
{
Assert.That(value1, Is.LessThan(value2));
}
can be simplified to
[TestCase(1)]
[TestCase(2)]
public void Example(int value1)
{
Assert.That(value1, Is.LessThan(42));
}
This reduces an unnecessary variable, helping you focus on what's important. (If you don't want a literal, you can use a const as opposed to a variable.)
The text was updated successfully, but these errors were encountered:
Another pet peeve of mine.
can be simplified to
This reduces an unnecessary variable, helping you focus on what's important. (If you don't want a literal, you can use a
const
as opposed to a variable.)The text was updated successfully, but these errors were encountered: