Example-based testing is all the rage in our unit and acceptance test suites: Given/When/Then is commonly implemented as driving a system with an initial state and a command, and checking the output is equal to what is expected.
Property-based testing lets the programmer generate a set of possible inputs to the System Under Test, and check invariant properties that should always be satisfied.
The interesting aspects of property-based testing are:
We’ll show a complete example of property-based testing a date/time related library.