mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-03 09:46:54 +02:00
Fix MSTEST0017: Correct assertion argument order (#46712)
Swap expected/actual arguments in 22 Assert calls to follow the correct MSTest convention of Assert.AreEqual(expected, actual). Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
This commit is contained in:
@@ -76,7 +76,7 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
|
||||
var result = _main.Object.Query(expectedQuery).Count;
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(result, 0);
|
||||
Assert.AreEqual(0, result);
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
@@ -101,12 +101,12 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
|
||||
var resultWithKeyword = _main.Object.Query(expectedQueryWithKeyword).Count;
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(result, 0);
|
||||
Assert.AreEqual(resultWithKeyword, 0);
|
||||
Assert.AreEqual(0, result);
|
||||
Assert.AreEqual(0, resultWithKeyword);
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
[DataRow("10+(8*9)/0,5")] // German decimal digit separator
|
||||
[DataRow("10+(8*9)/0,5")]// German decimal digit separator
|
||||
[DataRow("10+(8*9)/0.5")]
|
||||
[DataRow("10+(8*9)/1,5")] // German decimal digit separator
|
||||
[DataRow("10+(8*9)/1.5")]
|
||||
@@ -121,8 +121,8 @@ namespace Microsoft.PowerToys.Run.Plugin.Calculator.UnitTests
|
||||
var resultWithKeyword = _main.Object.Query(expectedQueryWithKeyword).FirstOrDefault().SubTitle;
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(result, "Copy this number to the clipboard");
|
||||
Assert.AreEqual(resultWithKeyword, "Copy this number to the clipboard");
|
||||
Assert.AreEqual("Copy this number to the clipboard", result);
|
||||
Assert.AreEqual("Copy this number to the clipboard", resultWithKeyword);
|
||||
}
|
||||
|
||||
[DataTestMethod]
|
||||
|
||||
Reference in New Issue
Block a user