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 Answers. Here you can ask and receive answers from other community members. And if you liked or disliked an answer or thread: react with an up- or downvote Enjoy!
0 votes

Hey guys,

Say I have this piece of code ( class \"AnExample\"):

  public class AnExample

    {

        private string SomePrivateField;

        private int SomeOtherPrivateField= 0;

 public ClassUnderTest()

        {

            SomePrivateField = \"Blablabla\";

        }

}

I want to fake the instance of \"SomePrivateField\" and make it return \"Hello!\" rather than \"Blablabla\". How do I do it?

When I try with Isolate.Fake.Instance<AnExample> the test fails with the message that the actual output is \"Blablabla\" and not \"Hello!\". Any insights?

asked by (640 points)
edited by

Please log in or register to answer this question.

...