Hi,
Sometimes I know that the legacy code I'm using (and mocking) instantiates an object that I need to mock, but I don't know the class of this object, just the interface. For example, there might be some FooFactory:
IFoo FooFactory.CreateFoo(someparams) {...};
Actually, it can create some FooImpl object (where FooImpl is a well-hidden internal class), or create different objects depending on someparams. There are also cases when you have some abstract or even concrete class instead of IFoo here, but the object created is a descendant of this class, so TypeMock refuses to mock it. In any case, would be great to have it mocked.
By the way, can we mock objects created via Activator.CreateInstance?
Thanks for the great product!
ulu