title: How to unit test a method that contains a struct as a parameter?
body: <p>I am writing a unit test for a method that takes a struct as a parameter.</p>
  
  <p>I created an instance of the class with the method I want to test in the TestClass but I cannot access its struct member even though it is set as public in the class.</p>
  
  <p>Am I missing something or is this not possible?</p>
  
  <p>Here is the code for the class:</p>
  
  <pre><code>public class Patient
  {
      public struct patientInfo
      {
          public string firstName;
          public string lastName;
          public string telephoneNumber;
          public string dateOfBirth;
          public string gender;         
          public string address;
      }
  
   // Method I want to test:
   public bool Register(patientInfo patientDetails)
   {
        // Method code in here.
   }
  </code></pre>
  
  <p>Code for the test class:</p>
  
  <pre><code>[TestClass]
  public class RegisterPatientTest
  {       
      [TestMethod]
      public void RegisterMethodTest()
      {
  
          Patient TestPatient = new Patient();
  
          TestPatient. //Can't access the struct member...            
  
          // What I want to use the struct for but gives error:  
          Assert.IsTrue(TestPatient.Register(patientDetails) == false);    
      }
  }
  </code></pre>