-
-
Notifications
You must be signed in to change notification settings - Fork 820
Closed as not planned
Labels
Description
This was originally opened here.
Basically, the issue is that Moq uses a single ProxyGenerator
, which is fine for 99% of the scenarios. However, I have a scenario where I'm dealing with types that get created at runtime and consequently, can cause collisions with the proxy type cache because the type can change.
The ideal solution would be to be able to use a MockRepository
and provide a proxy generator or at least specify that it should use its own proxy generator, separate from the rest of proxy generator, so that any mocks based on those volatile types won't get cached for very long and can be easily invalidated.