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
I have problems getting started with using TypeMock Isolator for SharePoint. When I run the SharePoint example that comes with TypeMock Isolator I get errors like this when I run the tests.

Test method Typemock.Examples.Sharepoint.SPUserTests.CreateUserIfDoesNotExist_CallWithUserThatDoesNotExist_NewUserCreated threw exception: 
System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.NullReferenceException: Object reference not set to an instance of an object.  


Typemock.Examples.Sharepoint.SPUserTests.<>c__DisplayClass2.<CreateUserIfDoesNotExist_CallWithUserThatDoesNotExist_NewUserCreated>b__0() in C:\Program Files (x86)\Typemock\Isolator\7\Examples\Sharepoint\SPUserTests.cs: line 32
System.RuntimeMethodHandle._InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
System.RuntimeMethodHandle.InvokeMethodFast(IRuntimeMethodInfo method, Object target, Object[] arguments, Signature sig, MethodAttributes methodAttributes, RuntimeType typeOwner)
System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
System.Delegate.DynamicInvokeImpl(Object[] args)
System.Delegate.DynamicInvoke(Object[] args)
gp.c()
be.a(Boolean A_0)
dq.b(Boolean A_0)
iw.b(Boolean A_0)
iw.a(Object A_0, Boolean A_1, Func`1 A_2, Action A_3, Action A_4, Action A_5, Boolean A_6)
iw.b(Object A_0)
TypeMock.ArrangeActAssert.ExpectationEngine`1.a(TResult A_0)
Typemock.Examples.Sharepoint.SPUserTests.CreateUserIfDoesNotExist_CallWithUserThatDoesNotExist_NewUserCreated() in C:\Program Files (x86)\Typemock\Isolator\7\Examples\Sharepoint\SPUserTests.cs: line 32


This happens with the other examples on the homepage too. What am I doing wrong?
asked by Chris (3.2k points)

5 Answers

0 votes
Hi,

Can you please execute the tests with logs and attach them to the post?

In order to run with logs, in Visual-Studio:
Typemock->Options->Visual Studio->Enable Logs.

Regards,
Elisha,
Typemock Support
answered by Elisha (12k points)
0 votes
The file is too big to attach, here is a download link https://rapidshare.com/files/1273702158/logs.zip.
Or if you prefer email please give me your address.
answered by Chris (3.2k points)
0 votes
Hi,

Thanks for the logs, can you please let me know what version of VS are you using, what OS (32 or 64)? Was it a new install or upgrade of Isolator?

I was unable to reproduce it yet, can you try to run the test with VS integrated runner: Test->Run->All Tests in Solution. Does it result the same error?

Regards,
Elisha,
Typemock Support
answered by Elisha (12k points)
0 votes
VS 2010 Premium 10.0.40219.1
Windows Server 2008 R2 SP1-> 64-bit
It was a new installation and same error.
answered by Chris (3.2k points)
0 votes
I tested to run the examples on an almost identical machine, everything worked as intended. I found out that on the other machine the Microsoft.SharePoint.dll got somehow corrupted. After replacing it everything works fine.
Thank you for your help.
answered by Chris (3.2k points)
...