| 
  • If you are citizen of an European Union member nation, you may not use this service unless you are at least 16 years old.

  • You already know Dokkio is an AI-powered assistant to organize & manage your digital files & messages. Very soon, Dokkio will support Outlook as well as One Drive. Check it out today!

View
 

Advanced TDD

Page history last edited by Josh King 13 years, 11 months ago

- TDD helps drive design through SRP, decoupling, IOC.  Adjusting test

    to test only one thing pushes scenarios where you might separate

    order placement from order validation.

    - Can then design and test each independently.

 

- If it is not valid to have a null reference passed in to a method,

    us assert in that method to enforce the precondition rather than placing

    asserts in the test.

    - only for cases where you have control of the calling code, not for prod

    in public API

    - if null reference is a valid scenario, have tests for it.

 

- Tests drive design, different levels of test drive different levels of design.

    - Unit

    - Integration

    - Acceptance

 

- If the item under test is very complicated and hard to setup, it may be a

    code smell that the item under test is too complex.  Though, It may also be

    legitimately complex.

Comments (0)

You don't have permission to comment on this page.