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: https://www.typemock.com/mscorlib-types
 
What are the strategies for testing methods that return a Task of T.
 
Thanks
 
Matt B.

 

asked Aug 9 by MBeckius (490 points)
edited Sep 3 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.

Cheers,

Raphy

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

Meanwhile, you can take a look at the Docs, maybe that can help you.
https://www.typemock.com/docs?book=Isolator&page=Documentation%2FHtmlDocs%2Ffakingasyncmethods.htm

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

 

Matt B.
...