Files
B2B-Training/Tests/Stream/StreamTest.cs
Louis f90af7320f
All checks were successful
Tests / Unit Testing1 (push) Successful in 46s
ci: 👷 Update tests
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));
}
}