Home > Articles

This chapter is from the book

15.8 Exercises

Write tests for the following situations.

  1. A transaction may be canceled even when nothing has happened.
  2. A transaction may be completed even when nothing has happened.
  3. A partial payment may be made in a transaction, but the transaction cannot be completed until the rest of the payment is made.
  4. A partial refund may be made in a transaction in which a payment has been made. The transaction cannot be canceled until the rest of the refund is made.
  5. An overpayment is not permitted in a transaction.
  6. An overrefund is not permitted in a transaction.
  7. A negative payment, or refund, is not permitted.
  8. A negative count, or time period, is not permitted in a rent action in a transaction .

InformIT Promotional Mailings & Special Offers

I would like to receive exclusive offers and hear about products from InformIT and its family of brands. I can unsubscribe at any time.