Paperback: 296 pages
Publisher: Manning Publications; 2 edition (December 7, 2013)
Product Dimensions: 7.4 x 0.7 x 9.2 inches
Shipping Weight: 1.1 pounds (View shipping rates and policies)
Average Customer Review: 4.5 out of 5 stars See all reviews (24 customer reviews)
Best Sellers Rank: #60,687 in Books (See Top 100 in Books) #14 in Books > Computers & Technology > Programming > Languages & Tools > C# #24 in Books > Computers & Technology > Programming > Microsoft Programming > C & C++ Windows Programming #25 in Books > Computers & Technology > Programming > Software Design, Testing & Engineering > Testing
This is an impressive book about the ins-and-outs of unit testing. It managed to break down the big picture of unit testing that all other resources failed to explain.Yes, examples are in C#, but the art of writing good tests goes beyond the language you use. The C# example code is highly readable, and even the usage of specific .NET mocking frameworks is acceptable since it stays light on the more language-specific details (e.g. parameterized tests, InternalsVisibleTo).Here's what I found most useful:* The definition of what a unit test is actually testing (a unit of work, i.e. the sum of actions from a public method call that produces a single noticeable end result)* How to verify that single noticeable end result, and why certain types of verification (return values, public state/behavior change) are preferable to others (testing for interaction between objects)* Using stubs to decouple your code from external dependencies* Refactoring your code to create seams, inject new behavior, and ultimately make your code more testable and change-proof* When it's appropriate to perform interaction testing with mocks* The dangers of overspecifying tests - testing internal implementation vs. external behavior* Detecting when your test is telling you that your production code sucks* Smart ways to test event-related codeI enjoyed the author's balanced perspective on testing. He clearly lays out the pros and cons of each technique. This is important because it serves as a fair reminder that fancy design patterns and clever ways to mock and stub your code can hurt the readability and maintainability of your tests. Even when the author expresses an opinion, he makes it clear that it's only his opinion and not gospel.
The Art of Unit Testing: with examples in C# Edexcel A2 Chemistry Student Unit Guide (New Edition): Unit 5 Transition Metals and Organic Nitrogen Chemistry A Unit of Water, a Unit of Time Hacking: How to Hack Computers, Basic Security and Penetration Testing (Hacking, How to Hack, Hacking for Dummies, Computer Hacking, penetration testing, basic security, arduino, python) Hacking: Basic Security, Penetration Testing and How to Hack (hacking, how to hack, penetration testing, basic security, arduino, python, engineering) Hacking: How to Computer Hack: An Ultimate Beginner's Guide to Hacking (Programming, Penetration Testing, Network Security) (Cyber Hacking with Virus, Malware and Trojan Testing) The Basics of Hacking and Penetration Testing: Ethical Hacking and Penetration Testing Made Easy Hacking: Beginner's Guide to Computer Hacking, Basic Security, Penetration Testing (Hacking, How to Hack, Penetration Testing, Basic security, Computer Hacking) The Basics of Hacking and Penetration Testing: Ethical Hacking and Penetration Testing Made Easy (Syngress Basics Series) Delay Fault Testing for VLSI Circuits (Frontiers in Electronic Testing) Daniels and Worthingham's Muscle Testing: Techniques of Manual Examination, 8e (Daniels & Worthington's Muscle Testing (Hislop)) Guide to DNA Testing: How to Identify Ancestors, Confirm Relationships, and Measure Ethnic Ancestry through DNA Testing Bankruptcy and Debtor/Creditor: Examples and Explanations (Examples & Explanations) Examples & Explanation: Criminal Procedure Constitution & Police, Seventh Edition (Examples & Explanations) Examples & Explanations: Legal Writing, Second Edition (Examples and Explanations) Examples and Explanations: Remedies, 2nd Edition (Examples & Explanations) The Art of Self Muscle Testing: For Health, Life and Enlightenment TB 9-1300-279-12, UNIT LEVEL MAINTENANCE INFORMATION ON CARTRIDGE, 40MM: DUMMY, M922A1, 1993 OPERATOR'S AND UNIT MAINTENANCE MANUAL FOR LAUNCHER AND CARTRIDGE, 84 MILLIMETER: M136 (AT4) MC68851 Paged Memory Management Unit User's Manual