Monthly Archives: July 2014

How to mock lazy initialization of objects in C# unit tests using Moq

I was unable to find it clearly documented how to use Moq with objects that are to be lazy initialized, so below are the steps I took to do so. Here is my class under test: public class MyClass { … Continue reading

Posted in C#, Moq | Tagged , | 2 Comments