July 2015
Intermediate to advanced
296 pages
7h 27m
English
CHAPTER 6
![]()
Advanced Unit Testing and Test-Driven Development
If unit testing is a practice that you choose to utilize in your projects, chances are that once you get the hang of writing effective unit tests, you will write a lot of them. It’s important to remember that a unit test fixture is a class, and as such, you should take advantage of the benefits offered by object-oriented design.
Test Fixtures Are Classes Too
When writing your unit tests, be sure to keep your eyes open for any chance to reduce complexity. Since your test fixtures are usually centered on the same domain, you will find yourself creating instances of entities to be used ...