2023-11-02 20:54:57 +01:00

22 lines
613 B
C#

namespace Tests.Stream;
public class StreamTest
{
[Theory]
[InlineData("thisfileexist.txt", true)]
[InlineData("thisfiledontexist.txt", false)]
public void ExistFileTest(string filePath, bool expected)
{
Assert.Equal(expected, global::Stream.Stream.ExistFile(filePath));
}
[Theory]
[InlineData("MyReplaceTestFile.txt", 'e', 'f')]
public void MyReplaceTest(string filePath, char toReplace, char replace)
{
global::Stream.Stream.MyReplace(filePath, toReplace, replace);
Assert.Equal("Cfstvraimfntmagnifiquf\n", File.ReadAllText(filePath));
}
}