Using Moq in Mspec, Test failed with message ” the signature is incorrect”

I had a shared model layer in my solution.  I had only one web service which was implementing number of interfaces.

Among those all operations in the interfaces One of the operation or function signature was using the shared model domain.

I  wrote at least 12 tests all were pass but when I wrote test for the method which was using shared model layer started giving me error.

I  was creating a Mock of Interface using Moq library.

The reason of error was I didn’t add reference of the shared domain layer int my test project. It was throwing exception in a temp folder “The Signature is incorrect.”

As soon as I added the reference of shared domain layer into my test layer or project. Everything became green 🙂

Tags: , , , ,

Comments are closed.