Cart
Free Shipping in the UK
Proud to be B-Corp

Pragmatic Unit Testing in C# with NUnit Andy Hunt

Pragmatic Unit Testing in C# with NUnit By Andy Hunt

Pragmatic Unit Testing in C# with NUnit by Andy Hunt


£4.30
New RRP £20.95
Condition - Very Good
Only 2 left

Summary

Describing the ways to improve C# coding skills using unit testing, this book shows not just how to test, but what to test. It helps discover the tricky hiding places where bugs breed, and how to catch them using NUnit. It also covers how to use Mock Objects for testing and how to use unit testing to improve the design skills.

Pragmatic Unit Testing in C# with NUnit Summary

Pragmatic Unit Testing in C# with NUnit by Andy Hunt

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 confidence in our code, better ability to make deadlines, less time spent in the debugger, and less time beating on the code to make it work correctly. This book shows how to write tests, but more importantly, it goes where other books fear to tread and gives you concrete advice and examples of what to test--the common things that go wrong in all of our programs. Discover the tricky hiding places where bugs breed, and how to catch them using the freely available NUnit framework. It's easy to learn how to think of all the things in your code that are likely to break. We'll show you how with helpful mnemonics, summarized in a handy tip sheet. With this book you will: write better code, and take less time to write it; discover the tricky places where bugs breed; learn how to think of all the things that could go wrong; test individual pieces of code without having to include the whole project; and test effectively with the whole team. We'll also cover how to use Mock Objects for testing, how to write high quality test code, and how to use unit testing to improve your design skills. We'll show you frequent gotchas - along with the fixes - to save you time when problems come up. But the best part is that you don't need a sweeping mandate to change your whole team or your whole company. You don't need to adopt Extreme Programming, or Test-Driven Development, or change your development process in order to reap the proven benefits of unit testing. You can start unit testing, the pragmatic way, right away.

About Andy Hunt

Andy Hunt and Dave Thomas have more than 50 years combined experience, developing software for clients around the world. For the last 10 years they've been working together as The Pragmatic Programmers, helping clients write software and improve their development processes. They are authors of the best-selling The Pragmatic Programmer, and have written several other books. They speak at conferences globally, and are editors of IEEE Software's Construction column. Andy Hunt and Dave Thomas have more than 50 years combined experience, developing software for clients around the world. For the last 10 years they've been working together as The Pragmatic Programmers, helping clients write software and improve their development processes. They are authors of the best-selling The Pragmatic Programmer, and have written several other books. They speak at conferences globally, and are editors of IEEE Software's Construction column.

Table of Contents

About the Starter Kit Preface 1 Introduction 1.1 Coding With Confidence 1.2 What is Unit Testing? 1.3 Why Should I Bother with Unit Testing? 1.4 What Do I Want to Accomplish? 1.5 How Do I Do Unit Testing? 1.6 Excuses For Not Testing 1.7 Roadmap 2 Your First Unit Tests 2.1 Planning Tests 2.2 Testing a Simple Method 2.3 Running Tests with NUnit 2.4 Running the Example 2.5 More Tests 3 Writing Tests in NUnit 3.1 Structuring Unit Tests 3.2 NUnit Asserts 3.3 NUnit Framework 3.4 NUnit Test Selection 3.5 NUnit Custom Asserts 3.6 NUnit and Exceptions 3.7 Temporarily Ignoring Tests 4 What to Test: The Right-BICEP 4.1 Are the Results Right? 4.2 Boundary Conditions 4.3 Check Inverse Relationships 4.4 Cross-check Using Other Means 4.5 Force Error Conditions 4.6 Performance Characteristics 5 CORRECT Boundary Conditions 5.1 Conformance 5.2 Ordering 5.3 Range 5.4 Reference 5.5 Existence 5.6 Cardinality 5.7 Time 5.8 Try It Yourself 6 Using Mock Objects 6.1 Simple Stubs 6.2 Mock Objects 6.3 Formalizing Mock Objects 6.4 When Not To Mock 7 Properties of Good Tests 7.1 Automatic 7.2 Thorough 7.3 Repeatable 7.4 Independent 7.5 Professional 7.6 Testing the Tests 8 Testing on a Project 8.1 Where to Put Test Code 8.2 Test Courtesy 8.3 Test Frequency 8.4 Tests and Legacy Code 8.5 Tests and Reviews. 9 Design Issues 9.1 Designing for Testability 9.2 Refactoring for Testing 9.3 Testing the Class Invariant 9.4 Test-Driven Design 9.5 Testing Invalid Parameters A Gotchas A.1 As Long As The Code Works A.2 Smoke Tests A.3 Works On My Machine A.4 Floating-Point Problems A.5 Tests Take Too Long A.6 Tests Keep Breaking A.7 Tests Fail on Some Machines B Resources B.1 On The Web B.2 Bibliography C Summary: Pragmatic Unit Testing D Answers to Exercises

Additional information

GOR001891357
9780974514024
0974514020
Pragmatic Unit Testing in C# with NUnit by Andy Hunt
Used - Very Good
Paperback
The Pragmatic Programmers
20040427
155
N/A
Book picture is for illustrative purposes only, actual binding, cover or edition may vary.
This is a used book - there is no escaping the fact it has been read by someone else and it will show signs of wear and previous use. Overall we expect it to be in very good condition, but if you are not entirely satisfied please get in touch with us

Customer Reviews - Pragmatic Unit Testing in C# with NUnit