If you mock classes, you can pass constructor arguments when calling new Mock<T> :
So, if you have classes:
public class A {} public class B { private readonly A a; public B(A a) { this.a = a; } }
The following code creates layout B with layout A:
var mockA = new Mock<A>(); var mockB = new Mock<B>(mockA.Object);
nemesv
source share