Sometimes you want to write tests for a business rule that's based on multiple variables. Covering every possible permutation of the variables quickly becomes unsustainable. I've found myself using a different approach — one test for the positive case, and one test for each variable's negative case.
This is a decent idea for certain cases, but you’ll almost always have a better time if you use property based testing, in which case you can handle all negative cases with only a few such tests.
This is a decent idea for certain cases, but you’ll almost always have a better time if you use property based testing, in which case you can handle all negative cases with only a few such tests.