Skip to Content
C# and .NET Core Test-Driven Development
book

C# and .NET Core Test-Driven Development

by Ayobami Adewole
May 2018
Intermediate to advanced content levelIntermediate to advanced
300 pages
7h 35m
English
Packt Publishing
Content preview from C# and .NET Core Test-Driven Development

Summary

The Moq framework, when used together with the xUnit.net framework, can deliver a smooth unit testing experience and make the overall TDD process worthwhile. Moq provides powerful features that, when used effectively, can simplify the creation of dependencies mocking for unit tests.

Mock objects created with Moq can allow you to substitute the concrete dependencies in your unit tests for the created mocks created by you in order to isolate different units in your code for testing and subsequent refactoring, which can facilitate crafting elegant production-ready code. Also, you can use mock objects to experiment and test features available in dependencies that otherwise might not be easily done by using the live dependencies.

In this ...

Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Hands-On Design Patterns with C# and .NET Core

Hands-On Design Patterns with C# and .NET Core

Gaurav Aroraa, Jeffrey Chilberto
.NET Core in Action

.NET Core in Action

Dustin Metzgar

Publisher Resources

ISBN: 9781788292481Supplemental Content