title: How to unit test setters on classes that do not have paired getters?
body: <p>I'm writing unit tests for classes which have properties that have <strong>setters but no getters</strong>.</p>
  
  <p>I want to be able to <strong>test these setters</strong> to make sure they are setting the data correctly.</p>
  
  <p>I find my options are: </p>
  
  <ul>
  <li><strong>write getters</strong> for these functions so that I can test if they are set correctly</li>
  <li>write a method such as <code>testAllSetters()</code> which test them all at once</li>
  </ul>
  
  <p>But both solutions are <strong>undesirable</strong> since it adds unneeded functionality to the class just for the sake of testing it.</p>
  
  <ul>
  <li>I could also test the output of the class to see that it is correct in general, but in many cases this doesn't test the individual setters as I would like</li>
  </ul>
  
  <p><strong>What is the best way to unit test setters on classes that do not have paired getters?</strong></p>