You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I setup a deep mock which setup all interface methods and properties with default values var mock = new Mock<Interface>{DefaultValue=DefaultValue.Mock};
then it takes more time than only setup a simple mock without all methods or properties var mock = new Mock<Interface>();
Would it be possible to make deep mock setup faster in moq when it only initializes methods and properties when they are reallly called? A lazy initialization for deep mocks?
The text was updated successfully, but these errors were encountered:
There should be no difference in performance between new Mock<T> and new Mock<T> { ... }, the assignments are neglibigle from a performance point of view. You're talking about code ("setting up a deep mock") that you're not showing here so it's hard to tell what the problem is.
When I setup a deep mock which setup all interface methods and properties with default values
var mock = new Mock<Interface>{DefaultValue=DefaultValue.Mock};
then it takes more time than only setup a simple mock without all methods or properties
var mock = new Mock<Interface>();
Would it be possible to make deep mock setup faster in moq when it only initializes methods and properties when they are reallly called? A lazy initialization for deep mocks?
The text was updated successfully, but these errors were encountered: