Is it possible to test the nested methods in C# 7.0 through xunit framework? For example, I have such simple nested method Func2()
:
// C# 7.0, LINQPad 5
void Func1(){
var name = "Bob";
Console.WriteLine($"Hello, {name}!");
void Func2(ref string n) {
n = "Super " + n;
Console.WriteLine($"How are you, {n}?");
};
Func2(ref name);
Console.WriteLine($"Hello again, {name}!");
}
Func1();