🐜
tiny engines
  • Tiny Engines
  • Personal Website Home
  • NFL machine learning capstone
    • project presentation
    • project proposal
    • project approach
    • project structure
    • project workflow
    • project summary
    • project code
  • Onboarding new hires
    • motivation
    • the project
    • the mailer service
      • mailer setup
      • walk-through
      • unit testing
      • testing the controller
      • testing the handler
      • testing the mailer
      • integration testing
      • integration example
      • acceptance testing
      • acceptance example
      • documenting the API
      • test coverage
      • performance testing
      • mutation testing
      • grammar checking
    • the event listener
      • design
      • webhook setup
      • walk-through
      • testing
      • the kafka connector
  • Walk-throughs
    • spark streaming hld
      • background
      • architecture
      • threat
      • project
      • transform-design
      • transform-poc
      • query-poc
    • kafka walkthroughs
    • java futures
      • async servers
      • async clients
      • async streams
Powered by GitBook
On this page

Was this helpful?

  1. Onboarding new hires
  2. the mailer service

unit testing

Previouswalk-throughNexttesting the controller

Last updated 3 years ago

Was this helpful?

The SendGrid mailer API is pretty basic. Let's first focus on unit testing those basic functions. One approach to testing a "unit under test" is to break out the input and outputs of the unit itself and any dependencies it has. A well-designed function (or a very simple one like this) should have clear inputs outputs and dependencies.

For any module we should ask: