Wednesday, 21 August 2013

How to mock with NSubstitute a method with an array parameter?

How to mock with NSubstitute a method with an array parameter?

I have the following interface:
interface IText
{
void CopyTo(char[] array, int index);
}
I would like to create a mock object implementing IText which
setsarray[index]='f', array[index+1]='o', array[index+2]='o' when CopyTo
is called.
Is this possible with NSubstitute? If so, how?

No comments:

Post a Comment