Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Writing testable code

Sponsored · Your Podcast. Everywhere. Effortlessly. Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.

Writing testable code

Avatar for Rodrigo Boniatti

Rodrigo Boniatti

November 30, 2019
Tweet

More Decks by Rodrigo Boniatti

Other Decks in Programming

Transcript

  1. Conditionals • Smell: • High cyclomatic complexity score; • How

    to solve? • Replace Conditional with Polymorphism;
  2. Life cycle events • Smell: • Hide code behavior; •

    No execution order; • How to solve? • Single flow;
  3. Principles of testing • Test in isolation; • A lot

    of setup == smell; • Hard to test == smell;