Support Invokes method with 5 arguments
See original GitHub issueI’d like to call Invokes
for method with 5 arguments (IDataRecord.GetBytes):
A.CallTo(() => dataRecord.GetBytes(10, A<long>._, A<byte[]>._, A<int>._, A<int>._))
.Invokes((int i, long fieldOffset, byte[] buffer, int bufferOffset, int length) => {
new Random().NextBytes(buffer);
}).Returns(16);
But Invokes
doesn’t support methods with 5 arguments 😦
Issue Analytics
- State:
- Created 7 years ago
- Comments:9 (9 by maintainers)
Top Results From Across the Web
c# - Invoke Methods having Different Parameters
I am facing one issue in Invoking different methods which are having different types of parameter. For eg. I have 3 methods A,...
Read more >Invoke with parameters?
Can someone help me? Is it possible to invoke a function while passing parameters? like: Invoke("mymethodname", parameter1, parameter2, ...
Read more >Are there guidelines on how many parameters a function ...
I've never seen a guideline, but in my experience a function that takes more than three or four parameters indicates one of two...
Read more >Python Function Examples – How to Declare and Invoke ...
This article will show you how to create and call your own Python functions. It will also give you an overview of how...
Read more >How to write a function that accepts any number of ...
When you call a function in JavaScript, you can pass in any number of arguments, regardless of what the function declaration specifies. There...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Thanks @ar7z1, but I agree with @blairconrad on this; we have to put a limit somewhere. Note that the convenience overloads of
Invokes
are defined as extension methods, so you can always declare more of them in your own code if you need them.@adamralph not at all! 😃