C# Dev Testing

Isolate Dependencies with Mocks you own this product

This project is part of the liveProject series Automated Testing for C# Developers
prerequisites
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

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


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.

prerequisites

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:

TOOLS
  • 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

features

Self-paced
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.

choose your plan

team

monthly
annual
$49.99
$499.99
only $41.67 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • Isolate Dependencies with Mocks project for free