I'm writing unit tests for a class that uses
XConnectClient, which means I need to mock an
Mock<XConnectClient> client = new Mock<XConnectClient>( new Mock<XConnectClientConfiguration>( new Mock<XdbModel>( "XdbName", new XdbModelVersion(RandomValue.Int(), RandomValue.Int()), new XdbNamedType, new XdbFacetDefinition, new XdbModel).Object, new Mock<Uri>(RandomValue.Uri().ToString()).Object).Object);
This compiles, but generates a
XConnectClientConfiguration.ctor at runtime. I don't know what is NULL here, and there's really too much going on in the mocking so it's not easily readable any more.
Is there a way of mocking
XConnectClient (preferrably without having to write a wrapper around it)?