Replace `Console.WriteLine` with `ITestOutputHelper ` https://xunit.net/docs/capturing-output
Replace
Console.WriteLinewithITestOutputHelperhttps://xunit.net/docs/capturing-output