Daily iOS
Testing

The first TDD test

You're adding coupon discount pricing rules to an online course app with TDD. In the red-green-refactor cycle, which example would you pick as the first test?

How would an interviewer hear this answer? You'll see whether they'd move on, dig in, or say no, and which sentences would trip you up. Your score doesn't change.
See the short answer

Start with the simplest example, that a course costs its list price when there's no coupon, watch it fail first, then add one percentage discount, and after that add examples where the rules branch, like a maximum discount cap or stacked coupons.

Share a question