The question is pretty simple. I've Moq'ed an IDocumentClient (which is the main DocumentDB .NET client). I am Moq'ing the ExecuteStoredProcedureAsync() method. It returns a StoredProcedureResponse type (a concrete type), but its interface is very locked down.
I figured I could just create a StoredProcedureResponse and embed my payload into the Response property, but it's setter is private. Moreover, the only constructor is parameterless.
What am I missing here? It would be ideal if the method returned an interface type (IStoredProcedureResponse), but I don't have control over that. I realize I could write a wrapper around the IDocumentClient, but that's not feasible.
The only thing I can think of is to extend and forcefully override the property with the "new" keyword - BUT, in the actual calling code, I would have a terrible hack in which I check the runtime type and downcast in order to use the override Resource property.