If I have
class ObjA {
public ObjB B;
}
class ObjB {
public bool Val;
}
and
class ObjectToMock {
public DoSomething(ObjA obj){...}
}
Is there any way to define an expectation that not only will DoSomething get called but that obj.B.Val == true?
I have tried
Expect.Call(delegate { mockObj.DoSomething(null);}).Constraints(new PropertyIs("B.Val", true));
but it seems to fail no matter what the value is.