1

I am trying to mock an extension method with justmock. For some reason it throws the following error:

"Test method TestProject1.JustMockTest.TestMethod threw exception: Telerik.JustMock.Core.ElevatedMockingException: Cannot mock 'TestProject1.Foo'. The profiler must be enabled to mock, arrange or execute the specified target."

How can I fix this?

Dioniss
  • 23
  • 3
  • You can´t really mock an extension-method, as those are `static`. – MakePeaceGreatAgain Dec 20 '19 at 15:11
  • Hi @HimBromBeere, The thread you have associated is for Moq and I am asking question about a different product - **JustMock**. They claim that JustMock supports mocking of extension method. Here is the link to their product page where you can check the **Mock Everything** section: https://www.telerik.com/products/mocking.aspx Could you please reopen my thread? – Dioniss Jan 06 '20 at 14:50

0 Answers0