Closed rajmondburgaj closed 4 years ago
This doesn't appear to be a question about Moq. It seems you're using DynamicProxy directly... but it's hard to tell without seeing more code.
Could you please post a minimal, self-contained, runnable repro code example (aka MCVE)?
Hi,
Thanks for the reply, tried to replicate to another project but for some reason I was not able too. Will check one more time next week and see if I can find the issue. Will let you know about the result.
Br
@rajmondburgaj - It's been a while, no repro so far. Should we close this?
hi,
I have an issue with Moq & NUnit.
below is the issue:
I have an interface defined like this:
I want to get all implementations of this and test that none of them contains an empty or null name and some other stuff.
In my setup I have:
AddAllImplementations method is just a simple one:
basically I am adding some dependencies and at the end i get all interceptors from the ServiceProvider, store them in a variable and do a foreach on all of them like below.
I tried to remove the Where condition for a moment but still I get
Any idea why this might happen ? Do u think that my interface name
IInterceptor
might cause issues with dynamicproxy or something ?Funny fact: - this method fails only if I run the whole project. If i run only this one it does not fail. Also, I tried in Visual Studio 2017 & 2019 and both behave the same way. The Moq version was 4.12.0 and then i updated to 4.13.1 but still no luck.