title: Unit testing: Is it a good practice to have assertions in setup methods?
body: <p>In unit testing, the setup method is used to create the objects needed for testing.</p>
  
  <p>In those setup methods, I like using assertions: I know what values I want to see in those
  objects, and I like to document that knowledge via an assertion.</p>
  
  <p>In a recent post on <a href="https://stackoverflow.com/questions/1368900/unit-testing-is-it-bad-form-to-have-unit-test-calling-other-unit-tests">unit tests calling other unit tests</a> here on stackoverflow, the general feeling seems to be that unit tests should <em>not</em> call other tests:
  The answer to that question seems to be that you should refactor your setup, so
  that test cases do not depend on each other.</p>
  
  <p>But there isn't much difference in a "setup-with-asserts" and a 
  unit test calling other unit tests.</p>
  
  <p>Hence my question: Is it good practice to have assertions in setup methods? </p>
  
  <p>EDIT:</p>
  
  <p>The answer turns out to be: this is not a good practice in general. If the setup results need to be tested, it is recommended to add a separate test method with the assertions (the answer I ticked); for documenting intent, consider using Java asserts.</p>