title: Unit-Test a function
body: <p>Consider the following code</p>
  
  <pre><code>public class MyClass
  {
  
  public string FirstName { get; set; }
  public string SurName { get; set; }
  
  public MyClass GetInfo()
  {
      //Get data from database 
      ...
      return new MyClass(FirstName, SurName);
  }
  }
  </code></pre>
  
  <p>I want to unit test <code>GetInfo()</code> but can't seem to figure out how to actually test it. Would I create a mock of <code>MyClass</code> and then do something like <code>Assert.AreEqual(uinfo.FirstName,"John");</code> </p>
  
  <p>Thanks in advance for your help and support</p>