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

Im trying to mock a class and too see that the mocking is successful 

but it doesn't seems to have the effect i want 

This is an example 

 

auto poolclient = FAKE_ALL<PoolClient>();
auto ten = sjm::Sys::DoubleTime(10, 0);
WHEN_CALLED(poolclient->getWriteTime(ANY_VAL(PoolKey), ANY_VAL(bool))).Return(BY_VAL(ten));
auto time = poolclient->getWriteTime(destKey, true);

CHECK(time.sec() == 10);
the desired value is 10 but i get 0 as if the actual method is called. im running this with the -w -g4 and -O0 flugs and exporting the variables. Please assist 
asked by calebxyz (1.1k points)

1 Answer

0 votes

Hi Calebxyz,

Unfortunately, this is not enough information for us to help you.

If you can please refer to the other Q&A you posted and open a ticket in our Premium Support with all of the relevant information so we can assist you in the best way possible.  

As for this Q&A question, we will need a sample code which reproduces the issue.

Cheers,

Alon Sapozhnikov.

Support Speicalist.

answered by Alon_TypeMock (10.6k points)
...