I'm trying to do the following:
mockObject.Setup( a => a.MyObject.MyMethod( It.IsAny<string>() ).MyProperty ).Returns( ?? );
where the Returns() returns whatever string is input to MyMethod.
Is this possible?
When I try the following, I get System.Reflection.TargetParameterCountException: Parameter count mismatch.
mockObject.Setup( a => a.MyObject.MyMethod( It.IsAny<string>() ).MyProperty ).Returns( (string s) => s );