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.
... how to use Mocking Kernel in order to write our unit tests. It is possible to extend Mocking Kernels for different isolation frameworks, and for some of them including RhinoMocks, Moq and NSubstitute, mocking kernel extensions already ...
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 ...
... use mock (fake) objects. The mock object will only test the method you want to test, and you can make the mock object work any way that you want to. If you were to write your own ... using Moq and. [ 152 ] Unit Testing Chapter 6 Moq.