MSTestExtensions/CombinatorialTestMethodAttribute.cs
/// <summary>
/// Gets all the values for each parameter in the order they need to be passed to the function.
/// </summary>
/// <param name="testMethod">The test method.</param>
/// <returns>
/// A list of all parameters' values.  Each sub-array corresponds to a parameter, so
/// <c>argArrays[0]</c> will yield the values to pass to the first parameter. Additionally,
/// <c>argArrays[0][0]</c> will yield the first value to pass to the first parameter.
/// </returns>
Gets all the values for each parameter in the order they need to be passed to the function.
Gets all the values for each parameter in the order they need to be passed to the function .
private static object[][] GetArgumentsInOrder(ITestMethod testMethod)
        {
            var values = new List<object[]>();
            foreach (var p in testMethod.MethodInfo.GetParameters())
            {
                var attr = p.GetCustomAttribute<BaseCombinatorialArgumentAttribute>();
                IReadOnlyList<object> paramValues = attr.GetValues(testMethod, p);
                values.Add(paramValues.ToArray());
            }
            return values.ToArray();
        }
private static object [ ] [ ] GetArgumentsInOrder ( ITestMethod testMethod ) { var values = new List < object [ ] > ( ) ; foreach ( var p in testMethod . MethodInfo . GetParameters ( ) ) { var attr = p . GetCustomAttribute < BaseCombinatorialArgumentAttribute > ( ) ; IReadOnlyList < object > paramValues = attr . GetValues ( testMethod , p ) ; values . Add ( paramValues . ToArray ( ) ) ; } return values . ToArray ( ) ; }
Gets all the values for each parameter in the order they need to be passed to the function.
Gets all the values for each parameter in the order they need to be passed to the function .
A list of all parameters' values.  Each sub-array corresponds to a parameter, so
argArrays[0]argArrays[0][0]
A list of all parameters ' values . Each sub - array corresponds to a parameter so argArrays [ 0 ] argArrays [ 0 ] [ 0 ]
testMethod
ITestMethod
The test method.
The test method .