We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Hello,
I'm trying to mock TaskOrchestrationContext and I'm mocking the CallActivityAsync method: _mainMock.Setup(x => x.CallActivityAsync (GET_ENTITY_LOCK, It.IsAny(), It.IsAny()).Result) .Returns<string, Dto, TaskOptions>((name, entity, options) => _controller.GetEntityLock(entity).Result);
I got this error: Message: System.ArgumentException : Object of type 'Microsoft.DurableTask.TaskName' cannot be converted to type 'System.String'.
Stack Trace: RuntimeType.CheckValue(Object& value, ParameterCopyBackAction& copyBack, Binder binder, CultureInfo culture, BindingFlags invokeAttr) MethodBase.CheckArguments(Span1 copyOfParameters, IntPtr* byrefParameters, Span1 shouldCopyBack, ReadOnlySpan1 parameters, RuntimeType[] sigTypes, Binder binder, CultureInfo culture, BindingFlags invokeAttr) RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) Delegate.DynamicInvokeImpl(Object[] args) Extensions.InvokePreserveStack(Delegate del, IReadOnlyList1 args) line 158 <>c__DisplayClass23_0.b__2(IInvocation invocation) line 269 ReturnComputedValue.Execute(Invocation invocation) line 22 MethodCall.ExecuteCore(Invocation invocation) line 110 Setup.Execute(Invocation invocation) line 71
1 copyOfParameters, IntPtr* byrefParameters, Span
1 parameters, RuntimeType[] sigTypes, Binder binder, CultureInfo culture, BindingFlags invokeAttr) RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) Delegate.DynamicInvokeImpl(Object[] args) Extensions.InvokePreserveStack(Delegate del, IReadOnlyList
Can you help me figure out the issue? Thanks a lot!
The text was updated successfully, but these errors were encountered:
Never mind I got the problem
Sorry, something went wrong.
No branches or pull requests
Hello,
I'm trying to mock TaskOrchestrationContext and I'm mocking the CallActivityAsync method:
_mainMock.Setup(x => x.CallActivityAsync
(GET_ENTITY_LOCK, It.IsAny(), It.IsAny()).Result)
.Returns<string, Dto, TaskOptions>((name, entity, options) => _controller.GetEntityLock(entity).Result);
I got this error:
Message:
System.ArgumentException : Object of type 'Microsoft.DurableTask.TaskName' cannot be converted to type 'System.String'.
Stack Trace:
RuntimeType.CheckValue(Object& value, ParameterCopyBackAction& copyBack, Binder binder, CultureInfo culture, BindingFlags invokeAttr)
MethodBase.CheckArguments(Span
1 copyOfParameters, IntPtr* byrefParameters, Span
1 shouldCopyBack, ReadOnlySpan1 parameters, RuntimeType[] sigTypes, Binder binder, CultureInfo culture, BindingFlags invokeAttr) RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture) Delegate.DynamicInvokeImpl(Object[] args) Extensions.InvokePreserveStack(Delegate del, IReadOnlyList
1 args) line 158<>c__DisplayClass23_0.b__2(IInvocation invocation) line 269
ReturnComputedValue.Execute(Invocation invocation) line 22
MethodCall.ExecuteCore(Invocation invocation) line 110
Setup.Execute(Invocation invocation) line 71
Can you help me figure out the issue?
Thanks a lot!
The text was updated successfully, but these errors were encountered: