I have a test method where I call an private function that converts a kind of to another kind.
This static function have the following signature:
private static Destiny[] Array2Array<Origin,Destiny> (Origin[] OriginVector)
Since it's a private function, the tester give an error saying it cannot access it. So I got to this point:
Origin[] OriginVector = null; // TODO: Initialize to an appropriate value
Destiny[] expected = null; // TODO: Initialize to an appropriate value
Destiny[] actual;
var dummy = new ConversionClass();
var po = new PrivateObject( dummy, new PrivateType(typeof(ConversionClass)));
var acessor = new ConversionClassAcessor(po);
actual = po.Invoke("Array2Array",
new [] { typeof(Origin[]), typeof(Destiny[]) },
new object[] { OriginVector } );
EDIT: That last line throws an compiler error with the message "cannot convert type object to Destiny[]". What I'm doing wrong?