spring - Junit Mockito:How to Pass parameters: Arraylist,int value to Rest Junit API -


i writing junit rest api , have junit test method below snippet , can 1 tell me how can pass arraylist , int type of data when using mockito. can please tell me. test invocation eg:

`   list<myuser> myuserlist = new arraylist<myuser>();     myuser user1 = new usrhelper().create();     myuser user2 = new usrhelper().create();     myuserlist.add(user1);     myuserlist.add(user2);     mvcresult result =mockmvc.perform(post("/test1/test2/test3").contenttype(mediatype.application_json).content(jsonutils.tojsonstring(myuserlist)).param("myuserid", 1234).param("id", "abcd123")).andexpect(status().isok()).andreturn();` 

in above myuserlist arraylist , myuserid - int value. please let me know.

i got soultion , mapping parameter passed correctly. wrong parameter name (myuserid) passed. got fixed problem.thank you


Comments

Popular posts from this blog

ios - MKAnnotationView layer is not of expected type: MKLayer -

ZeroMQ on Windows, with Qt Creator -

unity3d - Unity SceneManager.LoadScene quits application -