• About
  • Privacy Policy
  • Disclaimer
  • Contact

Ebook epub download

Download free eBooks or read online. Fantasy, Thriller, Novels.

  • Home
  • How To Download
  • Computer
  • Engineering
  • Medical
  • Mystery
Home » Computer » The Art of Unit Testing: with examples in C#

The Art of Unit Testing: with examples in C#

admin
Add Comment
Computer
Friday, March 15, 2013

The Art of Unit Testing: with examples in C#

Author: Roy Osherove | Language: English | ISBN: 1617290890 | Format: EPUB

The Art of Unit Testing: with examples in C# Description

Summary

The Art of Unit Testing, Second Edition guides you step by step from writing your first simple tests to developing robust test sets that are maintainable, readable, and trustworthy. You'll master the foundational ideas and quickly move to high-value subjects like mocks, stubs, and isolation, including frameworks such as Moq, FakeItEasy, and Typemock Isolator. You'll explore test patterns and organization, working with legacy code, and even "untestable" code. Along the way, you'll learn about integration testing and techniques and tools for testing databases and other technologies.

About this Book

You know you should be unit testing, so why aren't you doing it? If you're new to unit testing, if you find unit testing tedious, or if you're just not getting enough payoff for the effort you put into it, keep reading.

The Art of Unit Testing, Second Edition guides you step by step from writing your first simple unit tests to building complete test sets that are maintainable, readable, and trustworthy. You'll move quickly to more complicated subjects like mocks and stubs, while learning to use isolation (mocking) frameworks like Moq, FakeItEasy, and Typemock Isolator. You'll explore test patterns and organization, refactor code applications, and learn how to test "untestable" code. Along the way, you'll learn about integration testing and techniques for testing with databases.

The examples in the book use C#, but will benefit anyone using a statically typed language such as Java or C++.

Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.

What's Inside

  • Create readable, maintainable, trustworthy tests
  • Fakes, stubs, mock objects, 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 teams worldwide on the gentle art of unit testing and test-driven development. His blog is at ArtOfUnitTesting.com.

Table of Contents

PART 1 GETTING STARTED
  • The basics of unit testing
  • A first unit test

  • PART 2 CORE TECHNIQUES
  • Using stubs to break dependencies

  • Interaction testing using mock objects

  • Isolation (mocking) frameworks

  • Digging deeper into isolation frameworks

  • PART 3 THE TEST CODE
  • Test hierarchies and organization

  • The pillars of good unit tests

  • PART 4 DESIGN AND PROCESS
  • Integrating unit testing into the organization

  • Working with legacy code
  • Design and testability
    • Product Details
    • Table of Contents
    • Reviews
    • Paperback: 296 pages
    • Publisher: Manning Publications; Second Edition edition (December 4, 2013)
    • Language: English
    • ISBN-10: 1617290890
    • ISBN-13: 978-1617290893
    • Product Dimensions: 9.2 x 7.4 x 0.7 inches
    • Shipping Weight: 1.1 pounds (View shipping rates and policies)
    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 code

    I 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# Preview

    Link

    Please Wait...

    0 Response to "The Art of Unit Testing: with examples in C#"

    ← Newer Post Older Post → Home
    Subscribe to: Post Comments (Atom)

    Label

    • Art
    • Biography
    • Business
    • Children
    • Comics
    • Computer
    • Cookbooks
    • Craft
    • Education
    • Engineering
    • Health
    • History
    • Humor
    • Literature
    • Medical
    • Mystery
    • Parenting
    • Politics
    • Religion
    • Romance
    • Science
    • Science Fiction
    • Self Help
    • Sports
    • Teen
    • Travel

    Page

    • Home
    Powered by Blogger.
    Copyright 2013 Ebook epub download - All Rights Reserved Design by Mas Sugeng - Powered by Blogger and Google