c# - With Rhino Mocks how to stub a method that makes use of the params keyword? -


I am trying to establish hope on a repository. The method uses:

  string GetById (int key, parameter string [] args);   

Hopefully I have setup:

  var resourcereader = macrophotogram Generatormock & lt; IResourceRepository & gt; (); Resources. Re-estimate (R = & gt; RGTBID (ARGELT; et; GT); IECWall (123); Abug & Lt; String & gt; Is Acquired ("Name"), Abug & Lt; String & Quot; Ace & quot; ("no"), ebug & lieutenant; string> iacquel ("super"), string & gt; and excel ("mario"), abug & lt; string> ("Yes"), Abug & lt; string & gt; .qual ("perhaps")) .Return (String.Empty);   

throws an exception:

Exams of XYZ exam system: system Unknown Operation Exception: When using a duplicate method while recording, use only Arg in the call 2 Expected logic, 7 is defined.

What is wrong with the setup I expected?

The parameter is just an array:

  var resource-creator = macroprogram. Generatormock & lt; IResourceRepository & gt; (); Resource Ripo Estimates (R = & gt; RGTBIID (ARGILT; Int. Gt; ICEQU (123), Abug & lt; string [] & gt; List. Consensus All (new) ["Name", "Super" , "Mario", "No", "Yes", "Maybe"}))). Return (string.optim);    

Comments