I wanted to bypass an internal method call and hence have mocked it. The mocked method delegate looks like:
public Microsoft.Moles.Framework.MolesDelegates.OutOutFunc<string,string,string,
byte[]> GetlineStringStringOutStringOut { set; }
Now, in my test when I try to access this mocked method like:
GetlineStringStringOutStringOut = (a,b,c) => {return bytearray};
an error occurs saying parameter 2 and 3 must be declared with out keyword but when I declare them with out keyword it's doesn't compile at all. I read other SO questions and answers and it seems it can't be done.
Is it possible to provide user defined delegate for this? If yes, please give an example.
EDIT:
I tried to declare my own delegate of same signature as mocked delegate
static delegate byte[] MyFunc<String, String, String>
(string a, out string b, out string c);
but I'm not sure how can I call this while calling the mocked delegate method?