Copyright
Brief Table of Contents
Table of Contents
List of Figures
List of Tables
List of Listings
Early Praise for The Art of Unit Testing
Foreword
Preface
Acknowledgments
About this book
About the cover illustration
1. Getting started
Chapter 1. The basics of unit testing
1.1. Unit testing—the classic definition
1.1.1. The importance of writing “good” unit tests
1.1.2. We’ve all written unit tests (sort of)
1.2. Properties of a good unit test
1.3. Integration tests
1.3.1. Drawbacks of integration tests compared to automated unit tests
1.4. Good unit test—a definition
1.5. A simple unit test example
1.6. Test-driven development
1.7. Summary
Chapter 2. A first unit test
2.1. Frameworks for unit testing
2.1.1. What unit-testing frameworks offer
2.1.2. The xUnit frameworks
2.2. Introducing the LogAn project
2.3. First steps with NUnit
2.3.1. Installing NUnit
2.3.2. Loading up the solution
2.3.3. Using the NUnit attributes in your code
2.4. Writing our first test
2.4.1. The Assert class
2.4.2. Running our first test with NUnit
2.4.3. Fixing our code and passing the test
2.4.4. From red to green
2.5. More NUnit attributes
2.5.1. Setup and teardown
2.5.2. Checking for expected exceptions
2.5.3. Ignoring tests
2.5.4. Setting test categories
2.6. Indirect testing of state
2.7. Summary