title: How to do unit test console output with xUnit.net?
body: <p>I have a method that prints private variable of the class.</p>
  
  <pre><code>public class Test
  {
      private int number;
  
      public Test(int number)
      {
          this.number = number;
      }
  
      public void PrintValue()
      {
          Console.WriteLine("Number: " + number);
      }
  }
  </code></pre>
  
  <p>How can I create an unit test to make sure it prints value I expected on console?</p>