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
0 votes
I have recently upgraded to Typemock 5.4.5 from 5.4.4 and now a number of our tests fail with a nullreferenceexception.

The following MSTest Test Case highlights the problem and represent something that our code is doing:

The following test case throws the exception when *INSERT_INT* is greater than 2 i.e. more than 2 updates are made on the SPListItem:

**CODE**
SPWeb fakeWeb = Isolate.Fake.Instance<SPWeb>(Members.ReturnRecursiveFakes);
SPListItem fakeListItem = Isolate.Fake.Instance<SPListItem>(Members.ReturnRecursiveFakes);

Isolate.Swap.NextInstance<SPListItem>().With(fakeListItem);
SPList list = fakeWeb.getList("somedummylist");
SPListItem newItem = list.Items.Add();


for(int i =0; i < *INSERT_INT*; i++)
{
string fieldId = "testfield" + i;
newItem[fieldId] = "asdada";
}

***CODE***

Has the API changed in 5.4.5? or is it just something that I am doing that was illegal and now enforced in 5.4.5?
asked by aftan (2.5k points)

5 Answers

0 votes
Hi,

Thanks for reporting this issue. It seems as a new bug. I'm investigating it and I'll update about this issue.

Regards,
Elisha
Typemock Support
answered by Elisha (12k points)
0 votes
Hi,

This is indeed a bug in Isolator. It will be fixed in the next version of Isolator. I'll send you a patch with a fix soon.

Regards,
Elisha,
Typemock Support
answered by Elisha (12k points)
0 votes
Hi Elisha,

I received an email that directed me to the patch but it seems that the patch is only for Typemock Isolator and not Typemock Isolator for sharepoint?

Could you please send me the link to the updated version of typemock isolator for sharepoint that fixes the problem above?

Thanks.
answered by aftan (2.5k points)
0 votes
Aftan,

You should be able to put in your Isolator for Sharepoint license into the full product, and it will work according to your license. Please let me know if there are any problems with that.

Thanks,
Doron
Typemock Support
answered by doron (16.5k points)
0 votes
Thanks for the support all.

Yes, the patch works fine.

I was just a little confused as I had to uninstall typemock 5.4.5 as I was getting an error that a conflicting version was installed and when I installed the patch version I had to first select "Evaluate" as it once again reported that there was a conflict.

Otherwise it works great with Partcover :D
answered by aftan (2.5k points)
...