Skip to content

Commit

Permalink
test: hide tests
Browse files Browse the repository at this point in the history
  • Loading branch information
minkostaev committed Apr 17, 2024
1 parent 143de16 commit 705b3f2
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 49 deletions.
46 changes: 23 additions & 23 deletions ShortcutsGrid.Tests/Services/TestRunProcess.cs
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,28 @@
internal class TestRunProcess
{

//[Test]
//public void TestRunEmpty()
//{
// string result = RunProcess.Run("");
// Assert.IsEmpty(result);
//}

//[Test]
//public void TestRunCommand()
//{
// string result = RunProcess.Run("explorer");

// Assert.IsEmpty(result);
//}

//[Test]
//public void TestRunWrongCommand()
//{
// string result = RunProcess.Run("explorera");

// Assert.IsNotEmpty(result);
//}
[Test]
public void TestRunEmpty()
{
string result = RunProcess.Run("");

Assert.IsEmpty(result);
}

[Test]
public void TestRunCommand()
{
string result = RunProcess.Run("explorer");

Assert.IsEmpty(result);
}

[Test]
public void TestRunWrongCommand()
{
string result = RunProcess.Run("explorera");

Assert.IsNotEmpty(result);
}

}
52 changes: 26 additions & 26 deletions ShortcutsGrid.Tests/Ui/TestWindows.cs
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,32 @@
internal class TestWindows
{

[Test]
[Apartment(ApartmentState.STA)]
public void TestMainWindow()
{
string testhost = "testhost.csv";
string csvContent = GetInputFile(testhost);
File.WriteAllText(testhost, csvContent);

var mainWindow = new MainWindow();
mainWindow.Show();

if (File.Exists(testhost))
File.Delete(testhost);

Assert.IsInstanceOf<MainWindow>(mainWindow);
}

[Test]
[Apartment(ApartmentState.STA)]
public void TestAbout()
{
var about = new About();
///about.Show();

Assert.IsInstanceOf<About>(about);
}
//[Test]
//[Apartment(ApartmentState.STA)]
//public void TestMainWindow()
//{
// string testhost = "testhost.csv";
// string csvContent = GetInputFile(testhost);
// File.WriteAllText(testhost, csvContent);

// var mainWindow = new MainWindow();
// mainWindow.Show();

// if (File.Exists(testhost))
// File.Delete(testhost);

// Assert.IsInstanceOf<MainWindow>(mainWindow);
//}

//[Test]
//[Apartment(ApartmentState.STA)]
//public void TestAbout()
//{
// var about = new About();
// ///about.Show();

// Assert.IsInstanceOf<About>(about);
//}

public string GetInputFile(string fileName)
{
Expand Down

0 comments on commit 705b3f2

Please sign in to comment.