I especially like to create "decider" functions th...
# general
s
I especially like to create "decider" functions that are easy to test for situations like this. They are usually functions that return true or false when a decision needs to be made, such as when to apply taxes, charge for shipping, or otherwise alter the standard behavior of the code. The tests then simply pass in conditions that you expect to return true or false, and you assert that you get the desired result.