Sold Out
Book Categories |
About the Starter Kit | xi | |
Preface | xiii | |
1 | Introduction | 1 |
1.1 | Coding With Confidence | 2 |
1.2 | What is Unit Testing? | 3 |
1.3 | Why Should I Bother with Unit Testing? | 4 |
1.4 | What Do I Want to Accomplish? | 5 |
1.5 | How Do I Do Unit Testing? | 7 |
1.6 | Excuses For Not Testing | 7 |
1.7 | Roadmap | 12 |
2 | Your First Unit Tests | 13 |
2.1 | Planning Tests | 14 |
2.2 | Testing a Simple Method | 15 |
2.3 | Running Tests with NUnit | 16 |
2.4 | Running the Example | 22 |
2.5 | More Tests | 26 |
3 | Writing Tests in NUnit | 27 |
3.1 | Structuring Unit Tests | 27 |
3.2 | NUnit Asserts | 29 |
3.3 | NUnit Framework | 31 |
3.4 | NUnit Test Selection | 33 |
3.5 | NUnit Custom Asserts | 40 |
3.6 | NUnit and Exceptions | 41 |
3.7 | Temporarily Ignoring Tests | 42 |
4 | What to Test: The Right-BICEP | 45 |
4.1 | Are the Results Right? | 46 |
4.2 | Boundary Conditions | 49 |
4.3 | Check Inverse Relationships | 50 |
4.4 | Cross-check Using Other Means | 50 |
4.5 | Force Error Conditions | 51 |
4.6 | Performance Characteristics | 52 |
5 | Correct Boundary Conditions | 55 |
5.1 | Conformance | 56 |
5.2 | Ordering | 57 |
5.3 | Range | 59 |
5.4 | Reference | 62 |
5.5 | Existence | 63 |
5.6 | Cardinality | 64 |
5.7 | Time | 66 |
5.8 | Try It Yourself | 68 |
6 | Using Mock Objects | 73 |
6.1 | Simple Stubs | 74 |
6.2 | Mock Objects | 75 |
6.3 | Formalizing Mock Objects | 79 |
6.4 | When Not To Mock | 93 |
7 | Properties of Good Tests | 95 |
7.1 | Automatic | 96 |
7.2 | Thorough | 97 |
7.3 | Repeatable | 99 |
7.4 | Independent | 99 |
7.5 | Professional | 100 |
7.6 | Testing the Tests | 102 |
8 | Testing on a Project | 105 |
8.1 | Where to Put Test Code | 105 |
8.2 | Test Courtesy | 108 |
8.3 | Test Frequency | 109 |
8.4 | Tests and Legacy Code | 110 |
8.5 | Tests and Reviews | 113 |
9 | Design Issues | 117 |
9.1 | Designing for Testability | 117 |
9.2 | Refactoring for Testing | 119 |
9.3 | Testing the Class Invariant | 130 |
9.4 | Test-Driven Design | 132 |
9.5 | Testing Invalid Parameters | 134 |
A | Gotchas | 137 |
A.1 | As Long As The Code Works | 137 |
A.2 | "Smoke" Tests | 137 |
A.3 | "Works On My Machine" | 138 |
A.4 | Floating-Point Problems | 138 |
A.5 | Tests Take Too Long | 139 |
A.6 | Tests Keep Breaking | 139 |
A.7 | Tests Fail on Some Machines | 140 |
B | Resources | 141 |
B.1 | On The Web | 141 |
B.2 | Bibliography | 143 |
C | Summary: Pragmatic Unit Testing | 145 |
D | Answers to Exercises | 147 |
Login|Complaints|Blog|Games|Digital Media|Souls|Obituary|Contact Us|FAQ
CAN'T FIND WHAT YOU'RE LOOKING FOR? CLICK HERE!!! X
You must be logged in to add to WishlistX
This item is in your Wish ListX
This item is in your CollectionPragmatic unit testing
X
This Item is in Your InventoryPragmatic unit testing
X
You must be logged in to review the productsX
X
X
Add Pragmatic unit testing, Learn how to improve your C# coding skills using unit testing. Despite it's name, unit testing is really a coding technique, not a testing technique. Unit testing is done by programmers, for programmers. It's primarily for our benefit: we get improved con, Pragmatic unit testing to the inventory that you are selling on WonderClubX
X
Add Pragmatic unit testing, Learn how to improve your C# coding skills using unit testing. Despite it's name, unit testing is really a coding technique, not a testing technique. Unit testing is done by programmers, for programmers. It's primarily for our benefit: we get improved con, Pragmatic unit testing to your collection on WonderClub |