本文整理汇总了C#中ITestClass类的典型用法代码示例。如果您正苦于以下问题:C# ITestClass类的具体用法?C# ITestClass怎么用?C# ITestClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。
ITestClass类属于命名空间,在下文中一共展示了ITestClass类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: TestMethodManager
/// <summary>
/// Constructor for a test method manager, which handles executing a single test method
/// for a unit test provider.
/// </summary>
/// <param name="testHarness">The unit test harness object.</param>
/// <param name="testClass">The test class metadata object.</param>
/// <param name="testMethod">The test method metadata object.</param>
/// <param name="instance">The test class instance.</param>
/// <param name="provider">The unit test provider.</param>
public TestMethodManager(UnitTestHarness testHarness, ITestClass testClass, ITestMethod testMethod, object instance, IUnitTestProvider provider)
: base(testHarness, provider)
{
_testClass = testClass;
_testMethod = testMethod;
_instance = instance;
}
示例2: GetTestMethods
public override List<ITestMethod> GetTestMethods(ITestClass test, object instance)
{
return new List<ITestMethod>
{
_method
};
}
示例3: ScenarioResult
/// <summary>
/// Creates a result record.
/// </summary>
/// <param name="method">Test method metadata object.</param>
/// <param name="testClass">Test class metadata object.</param>
/// <param name="result">Test result object.</param>
/// <param name="exception">Exception instance, if any.</param>
public ScenarioResult(ITestMethod method, ITestClass testClass, TestOutcome result, Exception exception)
{
TestClass = testClass;
TestMethod = method;
Exception = exception;
Result = result;
}
示例4: TestClassManager
/// <summary>
/// A container type that handles an entire test class throughout the
/// test run.
/// </summary>
/// <param name="filter">Test run filter object.</param>
/// <param name="testHarness">The unit test harness.</param>
/// <param name="testClass">The test class metadata interface.</param>
/// <param name="instance">The object instance.</param>
/// <param name="provider">The unit test provider.</param>
public TestClassManager(TestRunFilter filter, UnitTestHarness testHarness, ITestClass testClass, object instance, IUnitTestProvider provider) : base(testHarness, provider)
{
_filter = filter;
_testClass = testClass;
_testExecutionQueue = new CompositeWorkItem();
_instance = instance;
}
示例5: RetryTestRunFilter
/// <summary>
/// Initializes a new test run filter using an existing settings file.
/// </summary>
/// <param name="test">The test class metadata.</param>
/// <param name="method">The test method metadata.</param>
public RetryTestRunFilter(ITestClass test, ITestMethod method) : base(null, null)
{
TestRunName = "Retry of " + test.Name + " " + method.Name;
_test = test;
_method = method;
}
示例6: Deserialize
/// <inheritdoc/>
public void Deserialize(IXunitSerializationInfo info)
{
TestClass = info.GetValue<ITestClass>("TestClass");
var methodName = info.GetValue<string>("MethodName");
Method = TestClass.Class.GetMethod(methodName, includePrivateMethod: true);
}
示例7: TestClassFinished
/// <summary>
/// Initializes a new instance of the <see cref="TestClassFinished"/> class.
/// </summary>
public TestClassFinished(IEnumerable<ITestCase> testCases, ITestClass testClass, decimal executionTime, int testsRun, int testsFailed, int testsSkipped)
: base(testCases, testClass)
{
ExecutionTime = executionTime;
TestsRun = testsRun;
TestsFailed = testsFailed;
TestsSkipped = testsSkipped;
}
示例8: TestClassCleanupFailure
/// <summary>
/// Initializes a new instance of the <see cref="TestClassCleanupFailure"/> class.
/// </summary>
public TestClassCleanupFailure(IEnumerable<ITestCase> testCases, ITestClass testClass, string[] exceptionTypes, string[] messages, string[] stackTraces, int[] exceptionParentIndices)
: base(testCases, testClass)
{
StackTraces = stackTraces;
Messages = messages;
ExceptionTypes = exceptionTypes;
ExceptionParentIndices = exceptionParentIndices;
}
示例9: TestMethod
/// <summary>
/// Initializes a new instance of the <see cref="TestMethod"/> class.
/// </summary>
/// <param name="class">The test class</param>
/// <param name="method">The test method</param>
public TestMethod(ITestClass @class, IMethodInfo method)
{
Guard.ArgumentNotNull("class", @class);
Guard.ArgumentNotNull("method", method);
Method = method;
TestClass = @class;
}
示例10: SetData
/// <inheritdoc/>
public void SetData(XunitSerializationInfo info)
{
TestClass = info.GetValue<ITestClass>("TestClass");
var methodName = info.GetString("MethodName");
Method = TestClass.Class.GetMethod(methodName, includePrivateMethod: false);
}
示例11: TestMethod
/// <inheritdoc/>
protected TestMethod(SerializationInfo info, StreamingContext context)
{
TestClass = info.GetValue<ITestClass>("TestClass");
var methodName = info.GetString("MethodName");
Method = TestClass.Class.GetMethod(methodName, includePrivateMethod: false);
}
示例12: TestClassData
/// <summary>
/// Initializes a new instance of the TestClassData type.
/// </summary>
/// <param name="testClass">The test class metadata.</param>
/// <param name="parent">The parent test assembly data object.</param>
public TestClassData(ITestClass testClass, TestAssemblyData parent)
{
_methods = new ObservableCollection<TestMethodData>();
_parent = parent;
Name = testClass.Name;
Namespace = testClass.Namespace;
}
示例13: TestClassDispatcher
public TestClassDispatcher(
UnitTestHarness testHarness, ITestClass testClass,
object instance, IUnitTestProvider provider)
: base(testHarness, provider)
{
_testClass = testClass;
_testExecutionQueue = new TestWorkItemDispatcher();
_instance = instance;
}
示例14: FailureControl
/// <summary>
/// Initializes a new failure web control.
/// </summary>
/// <param name="testClass">The test class metadata object.</param>
/// <param name="summaryControl">The overall summary control.</param>
public FailureControl(ITestClass testClass, FailureSummaryControl summaryControl) : base()
{
_summary = summaryControl;
Margin.All = 0;
Margin.Top = 4;
Margin.Bottom = 2;
CreateClassHeader(testClass.Name);
}
示例15: RunTestClassAsync
protected override Task<RunSummary> RunTestClassAsync(ITestClass testClass, IReflectionTypeInfo @class, IEnumerable<IXunitTestCase> testCases)
{
var combinedFixtures = new Dictionary<Type, object>(assemblyFixtureMappings);
foreach (var kvp in CollectionFixtureMappings)
combinedFixtures[kvp.Key] = kvp.Value;
// We've done everything we need, so let the built-in types do the rest of the heavy lifting
return new XunitTestClassRunner(testClass, @class, testCases, diagnosticMessageSink, MessageBus, TestCaseOrderer, new ExceptionAggregator(Aggregator), CancellationTokenSource, combinedFixtures).RunAsync();
}