The Art of Unit Testing
eBook - ePub

The Art of Unit Testing

with examples in C#

Roy Osherove

  1. 292 pages
  2. English
  3. ePUB (mobile friendly)
  4. Available on iOS & Android
eBook - ePub

The Art of Unit Testing

with examples in C#

Roy Osherove

Book details
Table of contents
Citations

About This Book

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

Frequently asked questions

How do I cancel my subscription?
Simply head over to the account section in settings and click on “Cancel Subscription” - it’s as simple as that. After you cancel, your membership will stay active for the remainder of the time you’ve paid for. Learn more here.
Can/how do I download books?
At the moment all of our mobile-responsive ePub books are available to download via the app. Most of our PDFs are also available to download and we're working on making the final remaining ones downloadable now. Learn more here.
What is the difference between the pricing plans?
Both plans give you full access to the library and all of Perlego’s features. The only differences are the price and subscription period: With the annual plan you’ll save around 30% compared to 12 months on the monthly plan.
What is Perlego?
We are an online textbook subscription service, where you can get access to an entire online library for less than the price of a single book per month. With over 1 million books across 1000+ topics, we’ve got you covered! Learn more here.
Do you support text-to-speech?
Look out for the read-aloud symbol on your next book to see if you can listen to it. The read-aloud tool reads text aloud for you, highlighting the text as it is being read. You can pause it, speed it up and slow it down. Learn more here.
Is The Art of Unit Testing an online PDF/ePUB?
Yes, you can access The Art of Unit Testing by Roy Osherove in PDF and/or ePUB format, as well as other popular books in Computer Science & Programming in C#. We have over one million books available in our catalogue for you to explore.

Information

Publisher
Manning
Year
2013
ISBN
9781638353058

Table of contents

    Citation styles for The Art of Unit Testing

    APA 6 Citation

    Osherove, R. (2013). The Art of Unit Testing ([edition missing]). Manning Publications. Retrieved from https://www.perlego.com/book/2682635/the-art-of-unit-testing-pdf (Original work published 2013)

    Chicago Citation

    Osherove, Roy. (2013) 2013. The Art of Unit Testing. [Edition missing]. Manning Publications. https://www.perlego.com/book/2682635/the-art-of-unit-testing-pdf.

    Harvard Citation

    Osherove, R. (2013) The Art of Unit Testing. [edition missing]. Manning Publications. Available at: https://www.perlego.com/book/2682635/the-art-of-unit-testing-pdf (Accessed: 25 September 2021).

    MLA 7 Citation

    Osherove, Roy. The Art of Unit Testing. [edition missing]. Manning Publications, 2013. Web. 25 Sept. 2021.