I would like to find a way to have a Dictionary of various Mock objects with their various instances keyed by some kind of unique identifier. I am using Moq, so the syntax for that is Mock<IFoo>
as far as the typing goes. But I would like to have the Dictionary contain basically this so I can dynamically resolve and overwrite instances at runtime:
Key = IFoo (basically a type)
Value = new SomeCustomType< T >
{
T ConcreteObject
Mock< T > MockObject
}
I may not be getting my question across appropriately but I could use some help!