If I have a function that takes an out parameter and accepts an input form console -
public void Test(out int a) { a = Convert.ToInt16(Console.ReadLine()); }
How can I accept input using Console.Readline () during a NUnit test? How can I use NUnit to test this method?
I tried using this code for my NUnit test case -
[TestCase] public void test() { int a = 0; ClassAdd ad = new ClassAdd(); ad.addition(out a);
how can I test a method that accepts an out parameter and also accepts user input from the console?
c # nunit console-application
pavanred
source share