Пример #1
0
 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));
 }
Пример #3
0
 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));
 }
Пример #4
0
 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);
 }