0

so I want to test my project using Xunit framework , there are 2 projects in the solution one for testing and other for the project itself.

So basically the program does something like this :

Console.Write("Give me the name of the file ");
inputPath = Console.ReadLine();
path = $"the path to the folder in my solution \\ {inputPath}";
output = File.ReadAllText(path);

Now I'd like to test the inputPath code (put in different stuff into it ) , so I'm not sure how to go about this , since the value of the variable is entered at runtime how can I do this when testing

Tried to use the function that has the code from above in the test project.

0 Answers0