What is testable code?
Posted
by Michael Freidgeim
on Geeks with Blogs
See other posts from Geeks with Blogs
or by Michael Freidgeim
Published on Tue, 04 Sep 2012 10:55:13 GMT
Indexed on
2012/09/07
21:39 UTC
Read the original article
Hit count: 256
Filed under:
We are improving quality of code and trying to develop more unit tests. The question that developers asked was "How to make code testable ?"
First and foremost, its loosely coupled, taking advantage of dependency injection (and auto-wiring), composition and interface-programming. Testable code is also readable - meaning it leverages single responsibility principle and Liskov substitution principle.
A few practical suggestions are listed in
More recommendations are in
It is slightly too theoretical - " the trick is translating these abstract concepts into concrete decisions in your code."
© Geeks with Blogs or respective owner