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
Products
Isolator for C++
Isolate ++
Isolator for .NET
Suggest
Isolate
Smart Runner
Coverage – Part of Typemock Isolator Complete .NET
Isolator for Build Server
Download
C++
.NET
Pricing
Resources
Documentation
Isolator++
Isolator
Learning Center
Tutorials
Webinars
Articles
Case Studies
Partners
Blog
Support
C++ Community
.NET Community
Premium Support
Products
Isolator for C++
Isolate ++
Isolator for .NET
Suggest
Isolate
Smart Runner
Coverage – Part of Typemock Isolator Complete .NET
Isolator for Build Server
Download
C++
.NET
Pricing
Resources
Documentation
Isolator++
Isolator
Learning Center
Tutorials
Webinars
Articles
Case Studies
Partners
Blog
Support
C++ Community
.NET Community
Premium Support
Menu
Search
Remember
Register
Typemock Q&A
Ask a question
All Activity
Questions
Hot!
Unanswered
Tags
Users
Ask a Question
The Unit Testing Company
Development Resources
Knowledge Base
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.
Related questions
Verify number of calls made on an object
DoStaticOrGlobalInstead error: taking the address of a temporary object of type '::Typemock::ControlAction'
Equivalent of the [assembly: NUnit.Framework.RequiresSTA] attribute
ExpectGet (in Mock class) equivalent in AAA API
Difference between MockObject.Object and Mock.MockedInstance
Natural TypeMock equivalent of MockObject.Object?
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
Jan 3, 2008
by
M. Johansson
Report User
(
2.2k
points)
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
Hi,
What you're looking for is:
RecorderManager.CreateMockedObject(typeof(WebRequest))
Let me know if it works out.
answered
Jan 3, 2008
by
gilz
Report User
(
14.5k
points)
Please
log in
or
register
to add a comment.
...
×
Choose the product type:
WINDOWS
LINUX DEB
LINUX RMP
×