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)TypemockIsolatorExamplesSharepointSPUserTests.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)TypemockIsolatorExamplesSharepointSPUserTests.cs: line 32
This happens with the other examples on the homepage too. What am I doing wrong?