Currently I am trying to mock the Text() method from Excel's Comment interface in C# with moq. MSDN link to Text()
My problem is, that I have to call it with no parameters because I just want to read the content. When calling Text() like this: mockComment.Setup(m => m.Text()).Returns("test comment") the following error is shown:
An expression tree may not contain a call or invocation that uses optional arguments
How can I call Text() so that moq can mock this method?
I am aware of this question link but my problem is that i do not have parameters to pass.