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
0 votes
I was just wondering how to write the reflective statement...

WebRequest request = MockManager.MockObject(typeof (WebRequest)).Object;

... in Natural TypeMocks?
(WebRequest is an abstract class, and as such has no public constructor)
asked by M. Johansson (2.2k points)

1 Answer

0 votes
Hi,

What you're looking for is:

RecorderManager.CreateMockedObject(typeof(WebRequest))


Let me know if it works out.
answered by gilz (14.5k points)
...