Get Free Shipping on orders over $79
Pragmatic Test-Driven Development in C# and .NET : Write loosely coupled, documented, and high-quality code with DDD using familiar tools and libraries - Adam Tibi

Pragmatic Test-Driven Development in C# and .NET

Write loosely coupled, documented, and high-quality code with DDD using familiar tools and libraries

By: Adam Tibi

eText | 30 September 2022 | Edition Number 1

At a Glance

eText


$53.89

or 4 interest-free payments of $13.47 with

 or 

Instant online reading in your Booktopia eTextbook Library *

Why choose an eTextbook?

Instant Access *

Purchase and read your book immediately

Read Aloud

Listen and follow along as Bookshelf reads to you

Study Tools

Built-in study tools like highlights and more

* eTextbooks are not downloadable to your eReader or an app and can be accessed via web browsers only. You must be connected to the internet and have no technical issues with your device or browser that could prevent the eTextbook from operating.

Learn how to apply TDD skills in your everyday .NET projects to produce robust software as well as utilize the power of TDD in C# to implement multiple useful features in your .NET projects

Key Features

  • Build a full TDD-based app to help you practice real-world scenarios
  • Get up and running with TDD quickly by using specific features of Visual Studio
  • Know the challenges of rolling TDD into your organization and build a plan

Book Description

Test-driven development is a manifesto for incrementally adding features to a product but starting with the unit tests first. Today's project templates come with unit tests by default and implementing them has become an expectation. It's no surprise that TDD/unit tests are on most job specifications and are important ingredients of most interviews and coding challenges. Adopting TDD will enforce good design practices and expedite your journey toward becoming a better coding architect.

This book goes beyond the philosophical debates and focuses on familiarizing you with TDD in a real-world setting by using popular frameworks such as ASP.NET and Entity Framework. The book starts with the foundational elements, before showing you how to use Visual Studio 2022 to build a To-Do application. To mimic real-life, you'll be using EF, SQL Server, and Cosmos, and utilize patterns including repository, service, and mediator. As a result of learning from this book, you'll also become familiar with domain-driven design (DDD) and other software best practices including SOLID and FIRSTHAND.

By the end of this TDD book, you'll have become confident in championing a TDD implementation. You'll also be equipped with a business and technical case for rolling out TDD or unit testing to present to your management and colleagues.

What you will learn

  • Write unit tests with xUnit and get to grips with dependency injection
  • Implement test doubles and mocking with NSubstitute
  • Use the TDD style for unit testing in conjunction with DDD and best practices
  • Mix TDD with the ASP.NET API, Entity Framework, and databases
  • Add the mediator design pattern and understand its effect on unit testing
  • Explore continuous integration with GitHub and Azure DevOps
  • Get introduced to advanced mocking scenarios and gain familiarity with Moq

Who This Book Is For

This book is for mid to senior-level .NET developers who are looking to utilize the potential of TDD to develop high-quality software. Basic knowledge of OOP and C# programming concepts is assumed but no knowledge of TDD or unit testing is expected. As the book provides in-depth coverage of all the concepts of TDD and unit testing, it acts as an excellent guide for developers who want to build a TDD-based application from scratch or developers planning to introduce unit testing into their organization.

Table of Contents

  1. Demonstrating TDD with a Hello World App
  2. Understanding Dependency Injection by Example
  3. Getting Started with Unit Testing
  4. Real Unit Testing with Test Doubles
  5. Test-Driven Development Explained
  6. The FIRSTHAND Guidelines of TDD
  7. A Pragmatic View of Domain-Driven Design
  8. Business Requirements and Infrastructure
  9. Option 1: Choosing Entity Framework and SQL Server
  10. Option 2: Choosing Repositories and Cosmos DB
  11. Cleaner Code with The Mediator Pattern
  12. Implementing Continuous Integration
  13. Dealing with Brownfield Projects
  14. The Intricacies of Rolling TDD Into Your Team
  15. Appendix: An Intro to Moq and MSTest
  16. Appendix 2: Advanced Mocking Scenarios - 10 pages
on
Desktop
Tablet
Mobile

More in Microsoft Programming

Hardening MCP Servers - Zain Karl

eBOOK