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
Hi,

Is mocking private methods with ref/out parameters an "enterprise-only" feature? The following snippet results in a "TypeMockException: This feature is an enterprise feature, to enable please enter license key.."
// ... code omitted

TestedClass_Accessor accessor = new TestedClass_Accessor(new PrivateObject(testObject));
DateTime testValue = DateTime.Now;

using (RecordExpectations recorder = RecorderManager.StartRecording())
{
    accessor.PrivateMethod(ref testValue);
    recorder.CheckArguments();
    recorder.Return(false);
}

// ... code omitted


Before upgrading to TypeMock 4.1 mocking ref/out parameters worked just fine. I also tried to reinstall TypeMock 4.1 but that didn't help.

Thanks in advance,
/Enrico
asked by megakemp (3k points)

5 Answers

0 votes
Hi
This looks strange. Thanks for reporting it.
I'll check it out and get back to you as soon as possible.
answered by ohad (35.5k points)
0 votes
Enrico hi,

It looks like this is an old thing that have been solved.
we will send you a fix offline.
answered by lior (13.2k points)
0 votes
Hi,

We've introduced the fix in the 4.2 version which is now out!

The bug was introduced with the 4.1 version and was fixed in the new version.
Let me know if after installing the new version you still encounter this problem
answered by lior (13.2k points)
0 votes
Hi Lior,

I have noticed the new 4.2 release, but is it a beta version? If so, when will the final version be released?

Kind regards,
/Enrico
answered by megakemp (3k points)
0 votes
Hi,

There is no specific date yet.
But I'm sure it wont take more then a couple of weeks.
answered by lior (13.2k points)
...