public ReflectedTheoryCase(MethodInfo method, TestDataInfo info) : base(method) { _data = info.TestData; _index = info.Index; _dataProviderName = info.ProviderName; Reason = _data.Reason; CopyFlags(_data.Flags); }
public TestCaseInfo CreateTestCase(MethodInfo method, TestDataInfo row) { return(new ReflectedTheoryCase(method, row)); }
public TestCaseInfo CreateTestCase(MethodInfo method, TestDataInfo row) { // Use _func; it should be the same as the method passed in return(new BespokeTheoryCase(_func, _baseTestName, row, _options)); }
public BespokeTheoryCase(Func <TestExecutionContext, object> func, TestName baseName, TestDataInfo info, TestOptions opts) : base(func.Method) { _func = func; _data = info.TestData; _index = info.Index; Reason = _data.Reason; CopyFlags(_data.Flags); _testName = baseName.WithIndex(_index).WithArguments(_data.Select(t => t.ToString())); Filters.AddAll(opts.Filters); Timeout = opts.Timeout; PassExplicitly = opts.PassExplicitly; Reason = opts.Reason; Tags.Add(TestTag.Dynamic); }