One of the things I got out of learning Haskell was learning about QuickCheck.
Now, my preferred testing method is to write pure functions attach generators for the given input types, assert invariant properties about them, and then let QuickCheck fuzz my functions where it will try to find a minimal example that breaks the given invariants.
The remaining stateful portions of code are tested through integration tests.
Now, my preferred testing method is to write pure functions attach generators for the given input types, assert invariant properties about them, and then let QuickCheck fuzz my functions where it will try to find a minimal example that breaks the given invariants.
The remaining stateful portions of code are tested through integration tests.