Skip to content

Commit

Permalink
Remove Windows tests due to issues on Linux.
Browse files Browse the repository at this point in the history
  • Loading branch information
TheNexusAvenger committed Jan 23, 2022
1 parent 7b985be commit 322ceae
Showing 1 changed file with 3 additions and 38 deletions.
41 changes: 3 additions & 38 deletions Uchu.Core.Test/Config/ConfigurationPathAttributeTest.cs
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,7 @@ public class TestConfiguration
[ConfigurationPath]
public string TestPath2 { get; set; } = "test1/test2";
[ConfigurationPath]
public string TestPath3 { get; set; } = "C:/test";
[ConfigurationPath]
public string TestPath4 { get; set; } = "C:\\test";
[ConfigurationPath]
public string TestPath5 { get; set; } = "/test";
public string TestPath3 { get; set; } = "/test";
[ConfigurationPath]
public string[] TestPaths1 { get; set; } = new string[]
{
Expand Down Expand Up @@ -53,41 +49,12 @@ public void TestNull()
{
ConfigurationPathAttribute.ReplaceFilePaths("", null);
}

/// <summary>
/// Tests replacing paths on Windows.
/// </summary>
[Test]
public void TestWindowsPaths()
{
// Replace the configuration paths.
var configuration = new TestConfiguration();
ConfigurationPathAttribute.ReplaceFilePaths("C:\\test1\\test2\\config.xml", configuration);

// Assert the strings are correct.
AssertPath(configuration.TestString, "test");
AssertPath(configuration.TestPath1, "C:\\test1\\test2\\test1");
AssertPath(configuration.TestPath2, "C:\\test1\\test2\\test1\\test2");
AssertPath(configuration.TestPath3, "C:\\test");
AssertPath(configuration.TestPath4, "C:\\test");
AssertPath(configuration.TestPath5, "\\test");

// Assert the array of strings is correct.
AssertPath(configuration.TestPaths1[0], "C:\\test1\\test2\\test1");
AssertPath(configuration.TestPaths1[1], "C:\\test1\\test2\\test1\\test2");
AssertPath(configuration.TestPaths1[2], "\\test");

// Assert the list of strings is correct.
AssertPath(configuration.TestPaths2[0], "C:\\test1\\test2\\test1");
AssertPath(configuration.TestPaths2[1], "C:\\test1\\test2\\test1\\test2");
AssertPath(configuration.TestPaths2[2], "\\test");
}

/// <summary>
/// Tests replacing paths on Linux.
/// </summary>
[Test]
public void TestLinuxPaths()
public void TestPaths()
{
// Replace the configuration paths.
var configuration = new TestConfiguration();
Expand All @@ -97,9 +64,7 @@ public void TestLinuxPaths()
AssertPath(configuration.TestString, "test");
AssertPath(configuration.TestPath1, "/test1/test2/test1");
AssertPath(configuration.TestPath2, "/test1/test2/test1/test2");
AssertPath(configuration.TestPath3, "C:/test");
AssertPath(configuration.TestPath4, "C:/test");
AssertPath(configuration.TestPath5, "/test");
AssertPath(configuration.TestPath3, "/test");

// Assert the array of strings is correct.
AssertPath(configuration.TestPaths1[0], "/test1/test2/test1");
Expand Down

0 comments on commit 322ceae

Please sign in to comment.