mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-10 21:41:51 +02:00
FxCopAnalyzer fixes for Wox.Test (#7312)
* Added InvarientCulture info (CA1305: Specify IFormatProvider) * Removed underscore from method names (CA1707: Identifiers should not contain underscores) * Marked members as static (CA1822: Mark members as static) * Removed initialization for DummyTestClass::IsFunctionCalled (CA1805: Do not initialize unnecessarily) * Replaced Count with Any (CA1827: Do not use Count/LongCount when Any can be used) * Changed WoxTest::DummyTestClass to private (CA1034: Nested types should not be visible) * Suppressed warnings for uninstantiated internal classes used as TestFixtures (CA1812: Avoid uninstantiated internal classes) * Enabled FxCopAnalyzer for Wox.Test * Added suppression message for CA1812 in GlobalSuppressions.cs and removed inline supression messages (CA1812: Avoid uninstantiated internal classes) * Changed InvariantCulture to Ordinal where appropriate * Addressing comments: Updated justification for CA1812 in GlobalSuppressions.cs (Avoid uninstantiated internal classes)
This commit is contained in:
@@ -14,9 +14,9 @@ namespace Wox.Test
|
||||
public class WoxTest
|
||||
{
|
||||
// A Dummy class to test that OnPropertyChanged() is called while we set the variable
|
||||
public class DummyTestClass : BaseModel
|
||||
private class DummyTestClass : BaseModel
|
||||
{
|
||||
public bool IsFunctionCalled { get; set; } = false;
|
||||
public bool IsFunctionCalled { get; set; }
|
||||
|
||||
private ICommand _item;
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Wox.Test
|
||||
}
|
||||
|
||||
[Test]
|
||||
public void AnyVariable_MustCallOnPropertyChanged_WhenSet()
|
||||
public void AnyVariableMustCallOnPropertyChangedWhenSet()
|
||||
{
|
||||
// Arrange
|
||||
DummyTestClass testClass = new DummyTestClass();
|
||||
|
||||
Reference in New Issue
Block a user