chevron-thin-right chevron-thin-left brand cancel-circle search youtube-icon google-plus-icon linkedin-icon facebook-icon twitter-icon toolbox download check linkedin phone twitter-old google-plus facebook profile-male chat calendar profile-male
+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 by (3.9k points)
edited by

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 by (3.9k points)
reshown by
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 by (3.9k points)
Thanks much!  That does the trick.

 

Matt B.
...