I'm trying to setup an expectation on a ICSharpContextActionDataProvider mock, using Moq and a Func-Delegate.
var classDeclarationMock = new Mock<IClassDeclaration>();
var contextActionDataProviderMock = new Mock<ICSharpContextActionDataProvider>();
.Setup(x => x.GetSelectedElement<IClassDeclaration>(false, true))
The problem is, that in order to use IClassDeclaration, I need to add a reference to JetBrains.Platform.ReSharper.Util.dll.
Once I do that, Moq or in fact any code that is using one of the delegates defined in the System namespace in mscorlib, suffer from an ambigous reference problem. So it's not Moq related, just when I came across the problem.
Reflector told me, that the delegates are also defined in a System namespace within JetBrains.Platform.ReSharper.Util.dll.
So my question is, can I somehow overcome this problem? There is probably a good reason why these delegates have been defined in there too.
Thx in advance! :)