Getting remaining Tests on stylecop (#5846)

This commit is contained in:
Clint Rutkas
2020-08-10 15:49:36 -07:00
committed by GitHub
parent 7bfd0823db
commit 082a78bd92
12 changed files with 117 additions and 170 deletions

View File

@@ -2,35 +2,36 @@
// The Microsoft Corporation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
using System.Runtime.CompilerServices;
using System.Windows.Input;
using NUnit.Framework;
using Wox.Plugin;
using PowerLauncher.ViewModel;
using System.Runtime.CompilerServices;
using Wox.Plugin;
namespace Wox.Test
{
[TestFixture]
public class Wox
public class WoxTest
{
// A Dummy class to test that OnPropertyChanged() is called while we set the variable
public class DummyTestClass : BaseModel
{
public bool isFunctionCalled = false;
public bool IsFunctionCalled { get; set; } = false;
private ICommand _item;
public ICommand Item
{
get
{
return this._item;
return _item;
}
set
{
if (value != this._item)
if (value != _item)
{
this._item = value;
_item = value;
OnPropertyChanged();
}
}
@@ -39,7 +40,7 @@ namespace Wox.Test
// Overriding the OnPropertyChanged() function to test if it is being called
protected override void OnPropertyChanged([CallerMemberName] string propertyName = null)
{
isFunctionCalled = true;
IsFunctionCalled = true;
}
}
@@ -53,7 +54,7 @@ namespace Wox.Test
testClass.Item = new RelayCommand(null);
// Assert
Assert.IsTrue(testClass.isFunctionCalled);
Assert.IsTrue(testClass.IsFunctionCalled);
}
}
}