This is a migrated thread and some comments may be shown as answers.

Getting Exception while doing Mock.Arrange()

1 Answer 7 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
Abdeali
Top achievements
Rank 1
Abdeali asked on 03 Aug 2015, 12:44 PM

Hello,

I am trying to do Mock.Arrange() in the following manner:

 var practice = Mock.Create<PracticeOptions>();
 Mock.Arrange(() => practice.PolicyExpirationDays).Returns(30);

I am getting the exception in the second line saying that "Cannot mock 'Int32 get_PolicyExpirationDays()'. The profiler must be enabled to mock, arrange or execute the specified target."

I tried updating\removing\installing JustMock on my machine but nothing is working out.

Please look into this asap as it's a bit urgent.

Thanks,

Abdeali

‚Äč

1 Answer, 1 is accepted

Sort by
0
Kaloyan
Telerik team
answered on 06 Aug 2015, 07:45 AM
Hello Abdeali,

I will close this thread for now, as you have submitted a support ticket on the same matter.

Regards,
Kaloyan
Telerik
Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
Tags
General Discussions
Asked by
Abdeali
Top achievements
Rank 1
Answers by
Kaloyan
Telerik team
Share this question
or