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
How can I mock some variables in the private static method?
How do I setup a strict mock?
Can I mock based on the state of the class to be mocked?
At what level should I place the typemock folder for server install
How to mock this static method which needs a delegate input?
Which objects i should mock?
0
votes
I have a method say
funcA( Object1 1, Object2 2)
{
1.x = GetSum(List<Objects>,x);
2.y = 100 * 10;
//some more processing on these objects
}
Then, when should I create Isolate.Fake.Instance<Object1>() or use the actual businee object like object1 obj = new object1(); obj.x = 10....and set values for the other objects as well.
asked
Sep 4, 2012
by
ankita
Report User
(
600
points)
Please
log in
or
register
to add a comment.
Please
log in
or
register
to answer this question.
1
Answer
0
votes
Hi Ankita,
In general, You shouldn't fake objects that you want to test, you should fake their dependencies.
In this specific case, If you want to test Class Object1- you need to create an actual object.
What is it you are trying to test?
answered
Sep 4, 2012
by
NofarC
Report User
(
4k
points)
Please
log in
or
register
to add a comment.
...
Typemock for Enterprise
Struggling with legacy code?
Let’s solve it together
Name
(Required)
First
Last
Email
(Required)
CAPTCHA
Email
This field is for validation purposes and should be left unchanged.
Δ
×
×
Choose the product type:
WINDOWS
LINUX DEB
LINUX RMP
×
Notifications