I am attempting to utilize Moq for my unit tests. I added the library to the project and I created the mock object
Mock _mock = new Mock<DocumentService>();
I am able to get intellisense for most methods off of the Mock object, such as Mock.Object, Mock.ShouldBe<>, etc… However it does NOT show Mock.Setup().
However, when I manually type out _mock.Setup() and I hold the cursor over the Setup() method and it shows the (what appears to be) correct signature. Also, when I attempt to use lambda expressions inside of the Setup() method I don’t get any intellisense.
So is there something I am missing to get this working?
You have:
Shouldn’t it be:
I’m sure there’s a base class, but this would be in line with the sort of slicing off half the functionality you’re seeing.
See, this is where lots of usage of
varcomes in!