Sign in
Log inSign up

Separation of Concerns and Unit Testing

Ben Goosman's photo
Ben Goosman
·Mar 24, 2020

Keeping related code together and unrelated code in other classes makes writing unit tests much easier. This is called SoC, or Separation of Concerns. By following SoC, one has more opportunity to mock class dependencies and simply verify the right functions are called, trusting that the dependency has its own unit tests.

Hassle-free blogging platform that developers and teams love.
  • Docs by Hashnode
    New
  • Blogs
  • AI Markdown Editor
  • GraphQL APIs
  • Open source Starter-kit

© Hashnode 2024 — LinearBytes Inc.

Privacy PolicyTermsCode of Conduct