C# Dev Testing

Isolate Dependencies with Mocks you own this product

This project is part of the liveProject series Automated Testing for C# Developers
intermediate C# • Visual Studio • ASP.NET web development • .NET development
skills learned
using mocks, stubs, and fakes • mocking frameworks to create isolated and maintainable tests • mocking best practices
Dror Helper
1 week · 8-10 hours per week · BEGINNER
filed under

placing your order...

Don't refresh or navigate away from the page.
liveProject This project is part of the liveProject series Automated Testing for C# Developers liveProjects give you the opportunity to learn new skills by completing real-world challenges in your local development environment. Solve practical problems, write working code, and analyze real data—with liveProject, you learn by doing. These self-paced projects also come with full liveBook access to select books for 90 days plus permanent access to other select Manning products. $19.99 $29.99 you save $10 (33%)
Isolate Dependencies with Mocks (liveProject) added to cart
continue shopping
adding to cart

Look inside
External services, databases, and other dependencies are hard to run in a predictable way and can often cause test failures when there is no issue in your code. In this liveProject, you’ll isolate unnecessary dependencies and replace them with mock objects that have more manageable behavior. You’ll then be able to develop isolated unit tests, which do not break due to external reasons, are easy to write and run, and have fast execution times.
This project is designed for learning purposes and is not a complete, production-ready application or solution.

book resources

When you start your liveProject, you get full access to the following books for 90 days.

project author

Dror Helper
Dror Helper is a freelance software developer and architect with twenty years of experience. He has worked for large enterprise companies including Intel and SAP, as well as startups. He has appeared in conferences worldwide since 2012 speaking about unit testing, TDD, and the AWS cloud.


This liveProject is for intermediate C# developers who want to improve their understanding of modern testing practices. No previous testing experience is required. To begin this liveProject, you will need to be familiar with:

  • Intermediate C#
  • Visual Studio: able to create new projects and install plugins, min. version 2019
  • ASP.NET and web development, min. version .NET 5
  • .NET desktop development
  • .NET Core cross-platform development
  • Basics of MongoDB
  • Basics of Docker: able to run Docker and Docker Compose files from Visual Studio
  • Basic YAML: able to read simple YAML files
  • Basic REST and HTTP for creating web services

you will learn

In this project, you will learn to create robust unit tests by faking unreliable dependencies. You’ll use Moq to create, configure and investigate fake objects.

  • What are fake objects
  • How to use mocks, stubs, and fakes to improve your unit tests
  • How fake objects work and their limitations
  • How to use a mocking framework to create isolated and maintainable tests
  • Mocking best practices to reduce the amount of code and work required when using Moq


You choose the schedule and decide how much time to invest as you build your project.
Project roadmap
Each project is divided into several achievable steps.
Get Help
While within the liveProject platform, get help from other participants and our expert mentors.
Compare with others
For each step, compare your deliverable to the solutions by the author and other participants.
book resources
Get full access to select books for 90 days. Permanent access to excerpts from Manning products are also included, as well as references to other resources.