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 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 by ankita (600 points)

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 by NofarC (4k points)
...