Mock Task or Task of T

+1 vote

When trying to mock Task I get the following:

 TypeMock.TypeMockException : 
*** Cannot mock unsupported types from mscorlib assembly. See supported types here:
What are the strategies for testing methods that return a Task of T.
Matt B.


asked Aug 9, 2017 by MBeckius (490 points)
edited Sep 3, 2017 by myriam

2 Answers

0 votes

Hi Matt,

As you've probably seen in the link you posted, Tasks are currently unsupported for faking in Typemock.

Do you have an example of a test you're trying to run? Maybe we can devise a strategy where Isolator can help with the issue.



answered Aug 10, 2017 by Raphy (2,970 points)
reshown Aug 13, 2017 by Raphy
0 votes

Meanwhile, you can take a look at the Docs, maybe that can help you.

answered Aug 10, 2017 by Raphy (2,970 points)
Thanks much!  That does the trick.


Matt B.