The examples in the book use C#, but will benefit anyone using a statically typed language such as Java or C++. Purchase of the print book includes a free eBook in PDF, Kindle, and ePub formats from Manning Publications.
... Moq framework, a popular tool in .NET, makes the mocking process super-easy. Let's explore how to use Moq to create mocks and set up our tests effectively. Here, we will discuss just how to use Moq to create mock classes. A practical ...
By the end of this book, you will have learned how to write clean and robust code through the effective practice of TDD, set up CI build steps to test and build applications as well as how to package application for deployment on NuGet.
He then shows you how to make them more robust and repeatable--and far more cost-effective. Loaded with information, this book feels like three books in one.
About this Book Dependency Injection in .NET introduces DI and provides a practical guide for applying it in .NET applications. The book presents the core patterns in plain C#, so you'll fully understand how DI works.
Leverage the full potential of Entity Framework with this collection of powerful and easy-to-follow recipes About This Book Learn how to use the new features of Entity Framework Core 1 Improve your queries by leveraging some of the advanced ...
This guide shows developers how to approach legacy applications with the state-of-the-art concepts, patterns, and tools developers apply to new projects.
... how to use Moq to mock an ICalculator interface and set up behavior for testing a MathService class that depends on that interface. The key is to use Mock<T> to create a mock object and then use Setup to define the behavior of the mock ...