This is a migrated thread and some comments may be shown as answers.

Is there Parameters limitation in JustMock

1 Answer 26 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
qwer
Top achievements
Rank 1
qwer asked on 15 Jul 2011, 08:59 AM
Hi There,
     Currently I've facing parameters limitation in JustMock,
I've several functions which have more than 9 parameter, (eg: 10 parameters)

When I'm mock my function, up to 9 parameter it is ok to compile, when my functions have 10 or more parameter JustMock give me error. as following
Error    17    Delegate 'Telerik.JustMock.Action2' does not take 10 arguments   



sample function
//Try to Produce Error of more than 9 Parameters for JustMock
void GetTestFunc(int param1, int param2, int param3, int param4, int param5,
 
string sParam6, string sParam7, string sParam8, string sParam9, string sParam10)
{
string _nothing= sParam10;
}
 
//Inside Test Project 
        Mock.Arrange(()=> GetTestFunc(Arg.AnyInt, Arg.AnyInt,Arg.AnyInt, Arg.AnyInt,Arg.AnyInt, Arg.AnyString,Arg.AnyString,Arg.AnyString,Arg.AnyString,Arg.AnyString))
                .DoInstead((int one, int two, int three, int four, int five, string a, string b, string c, string d, string e) =>
                    {
                        string _a = e;
                    });

1 Answer, 1 is accepted

Sort by
0
Ricky
Telerik team
answered on 20 Jul 2011, 09:22 AM
Hi Qwer,

Thanks again for reaching us. Here i am adding a task to support up to 16 arguments as like .net 4.0. Therefore, if you have arguments more than that then it’s great (best practice) to wrap them up in an object (POCO).

In addition if you need the fix with 16 arguments urgently, please open up a support ticket (since i can’t send internal builds to public forum) so that i can send you the latest internal build as soon as possible.

Kind regards,
Mehfuz
the Telerik team

Register for the Q2 2011 What's New Webinar Week. Mark your calendar for the week starting July 18th and book your seat for a walk through of all the exciting stuff we will ship with the new release!

Tags
General Discussions
Asked by
qwer
Top achievements
Rank 1
Answers by
Ricky
Telerik team
Share this question
or