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 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.
0 votes

Class to be mocked

class Address

{

Address() {};

virtual ~Address(){} 

void SetCountry(string country);

static void SetCountry(string country, string country1);

static void SetCountry(string country, string country1, string country2);

static void SetCountry(string country, string country1, string country2, string country3="");

}

Mocking code

TEST_METHOD(AssertCallWasNotMadeOnStaticDependency)

{

FAKE_STATICS<Address>(); // It will fail here. The same works if destructor is not virtual

}

asked by selvendran.ayyaswamy (600 points)

2 Answers

0 votes

Hi,

I will look into it and keep you posted on my progress.

If I will need any more information I will reply in the mail corresponding we have going.

Best,
Alon Sapozhnikov.
Support Specialist.

answered by Alon_TypeMock (10.6k points)
0 votes

Hi,

We managed to reproduce the problem and fix it.
we are arranging a patch for you to test before releasing the offical version.

The patch will be sent by mail.

Best,
Alon Sapozhnikov,
Support Specialist.

answered by Alon_TypeMock (10.6k points)
...