Episode
Mocking Dependencies and Verifying Behavior - Moq Overview (6 of 12) | Automated Software Testing
with Leslie Richardson, Robert Green, Phil Japikse
Welcome to the Automated Software Testing series, where you will learn how to increase the efficiency and ROI of your software testing. Moq is a popular framework for encapsulating and abstracting away dependencies. It can also be used for validating the behavior of the system under test. In this episode, Phil Japikse dives into the power and capabilities of Moq.
Chapters
- 00:00 - Introduction
- 01:30 - Why mock objects?
- 04:10 - Downside to using fakes
- 06:10 - Using mocks in tests
- 13:15 - Basic mocking in tests
- 15:45 - Using loose mocks and strict mocks
- 21:30 - Using property getters and setters
- 24:10 - Wrapup
Recommended resources
Related episodes
- Why Automated Software Testing Matters
- Testing with the xUnit Framework - Overview
- Testing with the xUnit Framework - Theories and Assertions
- Testing with the xUnit Framework - More Assertions
- BDD Style Testing with MSpec
- Mocking Dependencies and Verifying Behavior - Moq Overview
- Mocking Dependencies and Verifying Behavior - Applying Moq
- Mocking Dependencies and Verifying Behavior - Additional Moq Features
- Running Unit Tests with Azure Pipelines
- Running Unit Tests with GitHub Actions
- Integration Testing with SQL Server and EF Core
- Web Application Testing with Microsoft's Playwright
Connect
- Visual Studio | Twitter: @VisualStudio
Welcome to the Automated Software Testing series, where you will learn how to increase the efficiency and ROI of your software testing. Moq is a popular framework for encapsulating and abstracting away dependencies. It can also be used for validating the behavior of the system under test. In this episode, Phil Japikse dives into the power and capabilities of Moq.
Chapters
- 00:00 - Introduction
- 01:30 - Why mock objects?
- 04:10 - Downside to using fakes
- 06:10 - Using mocks in tests
- 13:15 - Basic mocking in tests
- 15:45 - Using loose mocks and strict mocks
- 21:30 - Using property getters and setters
- 24:10 - Wrapup
Recommended resources
Related episodes
- Why Automated Software Testing Matters
- Testing with the xUnit Framework - Overview
- Testing with the xUnit Framework - Theories and Assertions
- Testing with the xUnit Framework - More Assertions
- BDD Style Testing with MSpec
- Mocking Dependencies and Verifying Behavior - Moq Overview
- Mocking Dependencies and Verifying Behavior - Applying Moq
- Mocking Dependencies and Verifying Behavior - Additional Moq Features
- Running Unit Tests with Azure Pipelines
- Running Unit Tests with GitHub Actions
- Integration Testing with SQL Server and EF Core
- Web Application Testing with Microsoft's Playwright
Connect
- Visual Studio | Twitter: @VisualStudio
Have feedback? Submit an issue here.