Hello together
It seems that mocking the SPUser object out of the SharePoint 2010 assemblies is not working. I'm just calling the following line:
Which leads to the following error in my test initialization method:
Here is the call stack which refers to line 88 (the one posted above):
It would be nice to be able to mock the SPUser object. Thanks for any help!
Regards
Andreas
It seems that mocking the SPUser object out of the SharePoint 2010 assemblies is not working. I'm just calling the following line:
SPUser currentUser = Mock.Create<
SPUser
>();
Which leads to the following error in my test initialization method:
Initialization method XX.Presentation.Tests.LicensedPatents.AssociatedPatentsPresenterTests.InitalizeTest threw exception. System.MissingMethodException: System.MissingMethodException: Constructor on type 'System.Object[,]' not found..
Here is the call stack which refers to line 88 (the one posted above):
at System.RuntimeType.CreateInstanceImpl(BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, BindingFlags bindingAttr, Binder binder, Object[] args, CultureInfo culture, Object[] activationAttributes)
at System.Activator.CreateInstance(Type type, Object[] args)
at Telerik.JustMock.Utility.GetDefaultValue(Type target)
at Telerik.JustMock.Utility.ProcessArgument(Type target, BindingFlags flags, Object[] args)
at Telerik.JustMock.Utility.GetArgumentsWithDefaultValue(Type target)
at Telerik.JustMock.Utility.GetExtentedArguments(Type target, Object[] args)
at Telerik.JustMock.Mock.Create(Type target, Behavior behavior, Object[] args)
at Telerik.JustMock.Mock.Create(Type target, Object[] args)
at Telerik.JustMock.Mock.Create()
at XX.Presentation.Tests.LicensedPatents.AssociatedPatentsPresenterTests.InitalizeTest() in AssociatedPatentsPresenterTests.cs: line 88
It would be nice to be able to mock the SPUser object. Thanks for any help!
Regards
Andreas