CHAPTER 6

image

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 ...

Get Pro XAML with C#: Application Development Strategies now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.