/// <summary> /// Constructor. /// </summary> public TestArgumentListAttribute(TestArgumentListCallback listCallback) { if (listCallback == null) { throw new ArgumentNullException("listCallback"); } _listCallback = listCallback; }
/// <summary> /// Gets or sets the arguments to pass to a test. /// </summary> public override List <object[]> GetParameters(ITest test) { if (_listCallback == null) { MethodInfo method = test.Fixture.FixtureType.GetMethod(_listCallbackMethodName, BindingFlags.Instance | BindingFlags.Public | BindingFlags.NonPublic); if (!method.IsStatic) { _listCallback = (TestArgumentListCallback)Delegate.CreateDelegate( typeof(TestArgumentListCallback), test.Fixture.Instance, method); } else { _listCallback = (TestArgumentListCallback)Delegate.CreateDelegate( typeof(TestArgumentListCallback), method); } } return(_listCallback()); }