mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-04-04 18:26:39 +02:00
Getting remaining Tests on stylecop (#5846)
This commit is contained in:
@@ -3,16 +3,12 @@
|
||||
// See the LICENSE file in the project root for more information.
|
||||
|
||||
using NUnit.Framework;
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using Wox.Plugin;
|
||||
using PowerLauncher.ViewModel;
|
||||
|
||||
namespace Wox.Test
|
||||
{
|
||||
[TestFixture]
|
||||
class MainViewModelTest
|
||||
internal class MainViewModelTest
|
||||
{
|
||||
[Test]
|
||||
public void MainViewModel_GetAutoCompleteTextReturnsEmptyString_WhenInputIsNull()
|
||||
@@ -20,7 +16,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = null;
|
||||
String query = "M";
|
||||
string query = "M";
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetAutoCompleteText(index, input, query);
|
||||
@@ -35,7 +31,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = string.Empty;
|
||||
String query = "M";
|
||||
string query = "M";
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetAutoCompleteText(index, input, query);
|
||||
@@ -50,7 +46,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = "M";
|
||||
String query = null;
|
||||
string query = null;
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetAutoCompleteText(index, input, query);
|
||||
@@ -65,7 +61,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = "M";
|
||||
String query = string.Empty;
|
||||
string query = string.Empty;
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetAutoCompleteText(index, input, query);
|
||||
@@ -80,7 +76,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 2;
|
||||
string input = "Visual";
|
||||
String query = "Vis";
|
||||
string query = "Vis";
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetAutoCompleteText(index, input, query);
|
||||
@@ -95,14 +91,14 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = "VISUAL";
|
||||
String query = "VIs";
|
||||
string ExpectedAutoCompleteText = "VIsUAL";
|
||||
string query = "VIs";
|
||||
string expectedAutoCompleteText = "VIsUAL";
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetAutoCompleteText(index, input, query);
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(autoCompleteText, ExpectedAutoCompleteText);
|
||||
Assert.AreEqual(autoCompleteText, expectedAutoCompleteText);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -111,14 +107,14 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = "VISUAL";
|
||||
String query = "Vim";
|
||||
string ExpectedAutoCompleteText = string.Empty;
|
||||
string query = "Vim";
|
||||
string expectedAutoCompleteText = string.Empty;
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetAutoCompleteText(index, input, query);
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(autoCompleteText, ExpectedAutoCompleteText);
|
||||
Assert.AreEqual(autoCompleteText, expectedAutoCompleteText);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -127,7 +123,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = null;
|
||||
String query = "M";
|
||||
string query = "M";
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetSearchText(index, input, query);
|
||||
@@ -142,7 +138,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = string.Empty;
|
||||
String query = "M";
|
||||
string query = "M";
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetSearchText(index, input, query);
|
||||
@@ -157,7 +153,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = "Visual";
|
||||
String query = null;
|
||||
string query = null;
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetSearchText(index, input, query);
|
||||
@@ -172,7 +168,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = "Visual";
|
||||
String query = string.Empty;
|
||||
string query = string.Empty;
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetSearchText(index, input, query);
|
||||
@@ -187,14 +183,14 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = "VISUAL";
|
||||
String query = "VIs";
|
||||
string ExpectedAutoCompleteText = "VIsUAL";
|
||||
string query = "VIs";
|
||||
string expectedAutoCompleteText = "VIsUAL";
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetSearchText(index, input, query);
|
||||
|
||||
// Assert
|
||||
Assert.AreEqual(autoCompleteText, ExpectedAutoCompleteText);
|
||||
Assert.AreEqual(autoCompleteText, expectedAutoCompleteText);
|
||||
}
|
||||
|
||||
[Test]
|
||||
@@ -203,7 +199,7 @@ namespace Wox.Test
|
||||
// Arrange
|
||||
int index = 0;
|
||||
string input = "VISUAL";
|
||||
String query = "Vim";
|
||||
string query = "Vim";
|
||||
|
||||
// Act
|
||||
string autoCompleteText = MainViewModel.GetSearchText(index, input, query);
|
||||
|
||||
Reference in New Issue
Block a user