1 namespace Castle
.DynamicProxy
.Tests
4 using System
.Reflection
;
7 public class GenericTestUtility
9 public static void CheckMethodInfoIsClosed(MethodInfo method
, Type returnType
, params Type
[] parameterTypes
)
11 Assert
.IsFalse(method
.ContainsGenericParameters
);
12 Assert
.AreEqual(returnType
, method
.ReturnType
);
14 ParameterInfo
[] parameters
= method
.GetParameters();
15 Assert
.AreEqual(parameterTypes
.Length
, parameters
.Length
);
16 for(int i
= 0; i
< parameterTypes
.Length
; ++i
)
18 Assert
.AreEqual(parameterTypes
[i
], parameters
[i
].ParameterType
);