Skip to content

Commit

Permalink
fix name
Browse files Browse the repository at this point in the history
  • Loading branch information
LoneWandererProductions committed May 31, 2024
1 parent e0a3a01 commit 7bd7e04
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions CommonLibraryTests/DataFormatterTests.cs
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ public class DataFormatterTests
/// <summary>
/// The test file path
/// </summary>
private const string testFilePath = "testfile.txt";
private const string TestFilePath = "testfile.txt";

/// <summary>
/// Sets up.
Expand All @@ -32,7 +32,7 @@ public class DataFormatterTests
public void SetUp()
{
// Create a test file with UTF-8 encoding and special characters
using var writer = new StreamWriter(testFilePath, false, System.Text.Encoding.UTF8);
using var writer = new StreamWriter(TestFilePath, false, System.Text.Encoding.UTF8);
writer.WriteLine("Line 1 with Ü");
writer.WriteLine("Line 2 with ö");
}
Expand All @@ -57,17 +57,17 @@ public void Cvs()
lst.Add(line);
}

CsvHandler.WriteCsv(testFilePath, lst);
CsvHandler.WriteCsv(TestFilePath, lst);

Assert.IsTrue(File.Exists(testFilePath), "File exists");
Assert.IsTrue(File.Exists(TestFilePath), "File exists");

lst = CsvHandler.ReadCsv(testFilePath, ',');
lst = CsvHandler.ReadCsv(TestFilePath, ',');

Assert.AreEqual("0", lst[1][0], "Right Element");

Assert.AreEqual("9", lst[2][9], "Right Element");

FileHandleDelete.DeleteFile(testFilePath);
FileHandleDelete.DeleteFile(TestFilePath);
}

/// <summary>
Expand All @@ -77,9 +77,9 @@ public void Cvs()
public void TearDown()
{
// Clean up the test file
if (File.Exists(testFilePath))
if (File.Exists(TestFilePath))
{
File.Delete(testFilePath);
File.Delete(TestFilePath);
}
}

Expand All @@ -93,7 +93,7 @@ public void ReadFileShouldReadSpecialCharacters()
List<string> expectedLines = new List<string> { "Line 1 with Ü", "Line 2 with ö" };

// Act
List<string> actualLines = ReadText.ReadFile(testFilePath);
List<string> actualLines = ReadText.ReadFile(TestFilePath);

// Assert
CollectionAssert.AreEqual(expectedLines, actualLines);
Expand Down

0 comments on commit 7bd7e04

Please sign in to comment.