mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-07 03:36:44 +02:00
[fxcop] Settings UI unit tests (#6987)
* Add FxCop to project * Remove underscores from method names * Add message to obsolete test method * Mark method static * Method renames and remove unused ToRGBHex method * Method renames and replace Count() with the List.Count property * Method renames, rename unused OnSend argument, validate argument for AssertHotkeySettings
This commit is contained in:
@@ -24,7 +24,7 @@ namespace CommonLibTest
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Helper_CompareVersions_ShouldBeEqual_WhenSuccessful()
|
||||
public void HelperCompareVersionsShouldBeEqualWhenSuccessful()
|
||||
{
|
||||
TestStringsAreEqual("v0.0.0", "v0.0.0");
|
||||
TestStringsAreEqual("v0.1.1", "v0.1.1");
|
||||
@@ -33,7 +33,7 @@ namespace CommonLibTest
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
public void Helper_CompareVersions_ShouldBeSmaller_WhenSuccessful()
|
||||
public void HelperCompareVersionsShouldBeSmallerWhenSuccessful()
|
||||
{
|
||||
TestStringIsSmaller("v0.0.0", "v0.0.1");
|
||||
TestStringIsSmaller("v0.0.0", "v0.1.0");
|
||||
@@ -47,28 +47,28 @@ namespace CommonLibTest
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(FormatException))]
|
||||
public void Helper_CompareVersions_ShouldThrowBadFormat_WhenNoVersionString()
|
||||
public void HelperCompareVersionsShouldThrowBadFormatWhenNoVersionString()
|
||||
{
|
||||
Helper.CompareVersions("v0.0.1", string.Empty);
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(FormatException))]
|
||||
public void Helper_CompareVersions_ShouldThrowBadFormat_WhenShortVersionString()
|
||||
public void HelperCompareVersionsShouldThrowBadFormatWhenShortVersionString()
|
||||
{
|
||||
Helper.CompareVersions("v0.0.1", "v0.1");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(FormatException))]
|
||||
public void Helper_CompareVersions_ShouldThrowBadFormat_WhenLongVersionString()
|
||||
public void HelperCompareVersionsShouldThrowBadFormatWhenLongVersionString()
|
||||
{
|
||||
Helper.CompareVersions("v0.0.1", "v0.0.0.1");
|
||||
}
|
||||
|
||||
[TestMethod]
|
||||
[ExpectedException(typeof(FormatException))]
|
||||
public void Helper_CompareVersions_ShouldThrowBadFormat_WhenItIsNotAVersionString()
|
||||
public void HelperCompareVersionsShouldThrowBadFormatWhenItIsNotAVersionString()
|
||||
{
|
||||
Helper.CompareVersions("v0.0.1", "HelloWorld");
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user