By Roy Osherove
The artwork of Unit checking out, moment Edition courses you step-by-step from writing your first easy assessments to constructing powerful try units which are maintainable, readable, and reliable. you will grasp the foundational principles and speedy circulation to high-value topics like mocks, stubs, and isolation, together with frameworks similar to Moq, FakeItEasy, and Typemock Isolator. you will discover try styles and association, operating with legacy code, or even "untestable" code. alongside the way in which, you will know about integration trying out and methods and instruments for checking out databases and different applied sciences.
About this Book
You comprehend you need to be unit checking out, so why aren't you doing it? in case you are new to unit trying out, if you happen to locate unit checking out tedious, or in case you are simply no longer getting adequate payoff for the hassle you set into it, preserve analyzing.
The artwork of Unit checking out, moment Edition courses you step-by-step from writing your first easy unit exams to development entire try out units which are maintainable, readable, and reliable. you will flow quick to extra complex topics like mocks and stubs, whereas studying to take advantage of isolation (mocking) frameworks like Moq, FakeItEasy, and Typemock Isolator. you will discover try out styles and association, refactor code functions, and how one can try "untestable" code. alongside the best way, you are going to know about integration trying out and methods for checking out with databases.
The examples within the booklet use C#, yet will profit someone utilizing a statically typed language corresponding to Java or C++.
Purchase of the print e-book contains a unfastened book in PDF, Kindle, and ePub codecs from Manning courses.
- Create readable, maintainable, reliable tests
- Fakes, stubs, mock items, and isolation (mocking) frameworks
- Simple dependency injection techniques
- Refactoring legacy code
About the Author
Roy Osherove has been coding for over 15 years, and he consults and trains groups around the world at the mild paintings of unit checking out and test-driven improvement. His web publication is at ArtOfUnitTesting.com.
Table of Contents
PART 1 GETTING STARTED
- The fundamentals of unit testing
- A first unit test
- Using stubs to wreck dependencies
- Interaction checking out utilizing mock objects
- Isolation (mocking) frameworks
- Digging deeper into isolation frameworks
- Test hierarchies and organization
- The pillars of fine unit tests
- Integrating unit trying out into the organization
- Working with legacy code
- Design and testability
PART 2 center TECHNIQUES
PART three THE try out CODE
PART four layout AND PROCESS