MSTestExtensions/CombinatorialTestMethodAttribute.cs
/// <summary>
/// Validates the values being passed to each parameter.
/// </summary>
/// <param name="testMethod">The test method.</param>
/// <param name="arguments">The set of values for each parameter, as returned by <see cref="GetArgumentsInOrder"/>.</param>
Validates the values being passed to each parameter.
Validates the values being passed to each parameter .
private static void ValidateArguments(ITestMethod testMethod, object[][] arguments)
        {
            ParameterInfo[] allParameters = testMethod.MethodInfo.GetParameters();
            for (int i = 0; i < arguments.Length; i++)
            {
                object[] values = arguments[i];
                ParameterInfo parameter = allParameters[i];
                for (int j = 0; j < values.Length; j++)
                {
                    object v = values[i];
                    if (!parameter.ParameterType.GetTypeInfo().IsAssignableFrom(v.GetType()))
                    {
                        throw new ArgumentException(
                            $"Argument value ({GetValueString(v)}) has a type that is incompatible with parameter {parameter.Name}."
                        );
                    }
                }
            }
        }
private static void ValidateArguments ( ITestMethod testMethod , object [ ] [ ] arguments ) { ParameterInfo [ ] allParameters = testMethod . MethodInfo . GetParameters ( ) ; for ( int i = 0 ; i < arguments . Length ; i ++ ) { object [ ] values = arguments [ i ] ; ParameterInfo parameter = allParameters [ i ] ; for ( int j = 0 ; j < values . Length ; j ++ ) { object v = values [ i ] ; if ( ! parameter . ParameterType . GetTypeInfo ( ) . IsAssignableFrom ( v . GetType ( ) ) ) { throw new ArgumentException ( $" Argument value ( { GetValueString ( v ) } ) has a type that is incompatible with parameter  { parameter . Name } . " ) ; } } } }
Validates the values being passed to each parameter.
Validates the values being passed to each parameter .
testMethod
ITestMethod
The test method.
The test method .
arguments
object[][]
The set of values for each parameter, as returned by .
The set of values for each parameter as returned by .