GetDisplayName() public static method

Gets the display name for a method as used by NUnit.
public static GetDisplayName ( MethodInfo method, object arglist ) : string
method System.Reflection.MethodInfo The method for which a display name is needed.
arglist object The arguments provided.
return string
Exemplo n.º 1
0
 /// <summary>
 /// Returns the display name for the method, called with specific arguments.
 /// </summary>
 public string GetDisplayName(object[] args)
 {
     return(MethodHelper.GetDisplayName(MethodInfo, args));
 }
Exemplo n.º 2
0
        public void GetTypeArgumentsForMethodTests(string methodName, object[] args, Type[] typeArgs)
        {
            MethodInfo method = GetType().GetMethod(methodName, BindingFlags.Instance | BindingFlags.NonPublic);

            Assert.That(new GenericMethodHelper(method).GetTypeArguments(args), Is.EqualTo(typeArgs), MethodHelper.GetDisplayName(method, args));
        }