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
Moq version: 4.10.1
When using a property from a mocked object as parameter to the expression passed to a Setup() or Verify() and the type of that property is missing a default constructor, an Castle.DynamicProxy.InvalidProxyConstructorArgumentsException is thrown.
It works if using an expression to read the value, or storing the value in a temporary variable, but not by using it directly from the mocked instance.
@vgriph, thanks for taking the time to report this. That usage scenario is already fixed in the current master branch by the recent work done in #767 and #782. Please feel free to submit a PR to add your above tests to the regression tests (in tests/Moq.Tests/Regressions/IssueReportsFixture.cs)!
Moq version: 4.10.1
When using a property from a mocked object as parameter to the expression passed to a Setup() or Verify() and the type of that property is missing a default constructor, an Castle.DynamicProxy.InvalidProxyConstructorArgumentsException is thrown.
It works if using an expression to read the value, or storing the value in a temporary variable, but not by using it directly from the mocked instance.
See the following test code. (Unsing NUnit)
The text was updated successfully, but these errors were encountered: