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
Welcome to Typemock Community! Here you can ask and receive answers from other community members. If you liked or disliked an answer or thread: react with an up- or downvote.
0 votes
Hi:

I understand that the mscorlib assembly can't be mocked, and I'm sure there's a good reason for this, but is this something that may be addressed in the future or is this a permanent fixture?

There a several classes/methods I would like to use from this assembly, and I'm sure there must be several workaround.

TIA,
Martin.
asked by MartinH (3.2k points)

5 Answers

0 votes
Hi Martin,

We do have it on our list to allow mocking types from MSCorLib. And we'll get this implemented in a future version.

The workaround until then is simply to wrap calls on these types with your own methods, and mock those.
answered by gilz (14.5k points)
0 votes
Great, thanks for the information.

Regards,
Martin.
answered by MartinH (3.2k points)
0 votes
:?: Just so that we can implement the feature as fast as possible,
what are the classes/methods that you need to mock?
answered by eli (5.7k points)
0 votes
Eli:

:?: Just so that we can implement the feature as fast as possible,
what are the classes/methods that you need to mock?


Nothing specific, but System.IO, System.Collections.* (mainly generic), System.Globalization and System.Runtime.InteropServices are a few of the main contenders.

Thanks,
Martin.
answered by MartinH (3.2k points)
0 votes
Thanks 8)
answered by eli (5.7k points)
...