When using agents my (and most I talk to) go to method is to first have the agent generate tests and build the actual program around the tests it generates

But in the time where having great tests is more important than ever I don’t know how to write good tests

Stackoverflow discussion: https://stackoverflow.com/questions/3258733/how-do-i-write-great-unit-tests-for-an-existing-app

Basics of a unit test:

  • test one method
  • provide some specific arguments to that method
  • test that the result is as expected

DO NOT:

  • look inside the method to see what’s being done
  • not directly test the private methods that are being called

You should use mocking frameworks where needed to make replicable results