public void GetFilePaths_Testing() { //Arrange string directory = "../../../00_TestCashData/"; string searchForName = "Kontostand"; string expectedFilePath = "../../../00_TestCashData/Kontostand.csv"; LocalFileReader localFileReader = new LocalFileReader(); //Act string actualFilePath = localFileReader.GetFilePaths(directory, searchForName)[0]; Console.WriteLine(actualFilePath); //Assert Assert.AreEqual(expectedFilePath, actualFilePath, "FilePathSearch is wrong."); }
public void GetLatestFilePathFromArray_Testing() { //Arrange string directory = "../../../00_TestCashData/"; string searchForName = "Kontostand"; string expectedFilePath = "../../../00_TestCashData/Kontostand_newerFile.csv"; LocalFileReader localFileReader = new LocalFileReader(); //Act string[] filePaths = localFileReader.GetFilePaths(directory, searchForName); Console.WriteLine(filePaths[0]); Console.WriteLine(filePaths[1]); string actualFilePath = localFileReader.GetLatestFilePathFromArray(filePaths); Console.WriteLine(actualFilePath); //Assert Assert.AreEqual(expectedFilePath, actualFilePath, "FilePath last modified search is wrong."); }