Unit Testing Principals

(jUnit In Action)

a) Benefit from Access Modifiers
b) Don’t mix instantiation into your application logic
c) Don’t work in the constructor
d) Follow the Principle of Least Knowledge (Law of Demeter)
e) Avoid hidden dependencies
f) There is a bad side to singletons
g) Avoid static methods (Builds procedural programming)
h) Favor polymorphism over conditionals. (no long decisions)

Don't be shellfish...Share on FacebookShare on Google+Tweet about this on TwitterShare on LinkedInShare on TumblrEmail this to someone

Leave a Reply