• 设为首页
  • 点击收藏
  • 手机版
    手机扫一扫访问
    迪恩网络手机版
  • 关注官方公众号
    微信扫一扫关注
    公众号

C# ITestClass类代码示例

原作者: [db:作者] 来自: [db:来源] 收藏 邀请

本文整理汇总了C#中ITestClass的典型用法代码示例。如果您正苦于以下问题:C# ITestClass类的具体用法?C# ITestClass怎么用?C# ITestClass使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。



ITestClass类属于命名空间,在下文中一共展示了ITestClass类的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的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;
 }
开发者ID:jschementi,项目名称:silverlightut,代码行数:16,代码来源:TestMethodManager.cs


示例2: GetTestMethods

 public override List<ITestMethod> GetTestMethods(ITestClass test, object instance)
 {
     return new List<ITestMethod>
     {
         _method
     };
 }
开发者ID:garyjohnson,项目名称:wpnest,代码行数:7,代码来源:RetryTestRunFilter.cs


示例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;
 }
开发者ID:shijiaxing,项目名称:SilverlightToolkit,代码行数:14,代码来源:ScenarioResult.cs


示例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;
 }
开发者ID:kvervo,项目名称:HorizontalLoopingSelector,代码行数:16,代码来源:TestClassManager.cs


示例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;
 }
开发者ID:dfr0,项目名称:moon,代码行数:12,代码来源:RetryTestRunFilter.cs


示例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);
        }
开发者ID:MichalisN,项目名称:xunit,代码行数:9,代码来源:TestMethod.cs


示例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;
 }
开发者ID:modai888,项目名称:xunit,代码行数:11,代码来源:TestClassFinished.cs


示例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;
 }
开发者ID:ansarisamer,项目名称:xunit,代码行数:11,代码来源:TestClassCleanupFailure.cs


示例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;
        }
开发者ID:MichalisN,项目名称:xunit,代码行数:13,代码来源:TestMethod.cs


示例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);
        }
开发者ID:ansarisamer,项目名称:xunit,代码行数:9,代码来源:TestMethod.cs


示例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);
        }
开发者ID:ansarisamer,项目名称:xunit,代码行数:9,代码来源:TestMethod.cs


示例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;
        }
开发者ID:shijiaxing,项目名称:SilverlightToolkit,代码行数:13,代码来源:TestClassData.cs


示例13: TestClassDispatcher

 public TestClassDispatcher(
     UnitTestHarness testHarness, ITestClass testClass, 
     object instance, IUnitTestProvider provider) 
     : base(testHarness, provider)
 {
     _testClass = testClass;
     _testExecutionQueue = new TestWorkItemDispatcher();
     _instance = instance;
 }
开发者ID:dfr0,项目名称:moon,代码行数:9,代码来源:TestClassDispatcher.cs


示例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);
        }
开发者ID:dfr0,项目名称:moon,代码行数:15,代码来源:FailureControl.cs


示例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();
		}
开发者ID:niemyjski,项目名称:elasticsearch-net,代码行数:10,代码来源:TestCollectionRunner.cs


示例16: LogException

 /// <summary>
 /// Logs and Exception that was intercepted or observed.
 /// </summary>
 /// <param name="exception">The actual Exception instance.</param>
 /// <param name="test">The test class metadata.</param>
 /// <param name="method">The test method metadata.</param>
 public void LogException(Exception exception, ITestClass test, ITestMethod method)
 {
   string message = String.Format(CultureInfo.CurrentCulture, Properties.UnitTestMessage.LogException, exception.GetType().ToString(), exception.Message);
   LogMessage m = Create(LogMessageType.Error, message);
   MarkUnitTestMessage(m);
   DecorateTestGranularity(m, TestGranularity.TestScenario);
   m[UnitTestLogDecorator.ActualException] = exception;
   m[UnitTestLogDecorator.TestClassMetadata] = test;
   m[UnitTestLogDecorator.TestMethodMetadata] = method;
   Enqueue(m);
 }
开发者ID:fstn,项目名称:WindowsPhoneApps,代码行数:17,代码来源:UnitTestLogMessageWriter.cs


示例17: NoExceptionWhenExpected

 /// <summary>
 /// No Exception was intercepted, yet one was expected.
 /// </summary>
 /// <param name="expectedExceptionType">The expected exception type.</param>
 /// <param name="test">The test class metadata.</param>
 /// <param name="method">The test method metadata.</param>
 public void NoExceptionWhenExpected(Type expectedExceptionType, ITestClass test, ITestMethod method)
 {
   string message = String.Format(CultureInfo.CurrentCulture, Properties.UnitTestMessage.LogNoException, expectedExceptionType.ToString());
   LogMessage m = Create(LogMessageType.Error, message);
   MarkUnitTestMessage(m);
   DecorateTestGranularity(m, TestGranularity.TestScenario);
   m[UnitTestLogDecorator.IncorrectExceptionMessage] = true;
   m[UnitTestLogDecorator.ExpectedExceptionType] = expectedExceptionType;
   m[UnitTestLogDecorator.TestClassMetadata] = test;
   m[UnitTestLogDecorator.TestMethodMetadata] = method;
   Enqueue(m);
 }
开发者ID:fstn,项目名称:WindowsPhoneApps,代码行数:18,代码来源:UnitTestLogMessageWriter.cs


示例18: IncorrectException

 public void IncorrectException(Type expectedExceptionType, Type actualExceptionType, ITestClass test, ITestMethod method)
 {
     string message = String.Format(System.Globalization.CultureInfo.CurrentCulture, Properties.UnitTestMessage.LogIncorrectExceptionType, actualExceptionType.Name, expectedExceptionType.Name);
     LogMessage m = Create(LogMessageType.Error, message);
     MarkUnitTestMessage(m);
     DecorateTestGranularity(m, TestGranularity.TestScenario);
     m[UnitTestLogDecorator.IncorrectExceptionMessage] = true;
     m[UnitTestLogDecorator.ExpectedExceptionType] = expectedExceptionType;
     m[UnitTestLogDecorator.ActualExceptionType] = actualExceptionType;
     m[UnitTestLogDecorator.TestClassMetadata] = test;
     m[UnitTestLogDecorator.TestMethodMetadata] = method;
     Enqueue(m);
 }
开发者ID:garyjohnson,项目名称:wpnest,代码行数:13,代码来源:UnitTestLogMessageWriter.cs


示例19: FindTestsForType

        protected override bool FindTestsForType(ITestClass testClass,
                                                 bool includeSourceInformation,
                                                 IMessageBus messageBus,
                                                 ITestFrameworkDiscoveryOptions discoveryOptions)
        {
            var methodDisplay = discoveryOptions.MethodDisplayOrDefault();

            foreach (var method in testClass.Class.GetMethods(includePrivateMethods: true))
                if (!FindTestsForMethod(new TestMethod(testClass, method), methodDisplay, includeSourceInformation, messageBus))
                    return false;

            return true;
        }
开发者ID:Vasiliauskas,项目名称:samples.xunit,代码行数:13,代码来源:ObservationDiscoverer.cs


示例20: VsixTestClassRunner

		public VsixTestClassRunner (IVsClient vsClient,
								   ITestClass testClass,
								   IReflectionTypeInfo @class,
								   IEnumerable<IXunitTestCase> testCases,
								   IMessageSink diagnosticMessageSink,
								   IMessageBus messageBus,
								   ITestCaseOrderer testCaseOrderer,
								   ExceptionAggregator aggregator,
								   CancellationTokenSource cancellationTokenSource,
								   IDictionary<Type, object> collectionFixtureMappings)
			: base (testClass, @class, testCases, diagnosticMessageSink, messageBus, testCaseOrderer, aggregator, cancellationTokenSource, collectionFixtureMappings)
		{
			this.vsClient = vsClient;
		}
开发者ID:victorgarciaaprea,项目名称:xunit.vsix,代码行数:14,代码来源:VsixTestClassRunner.cs



注:本文中的ITestClass类示例整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。


鲜花

握手

雷人

路过

鸡蛋
该文章已有0人参与评论

请发表评论

全部评论

专题导读
上一篇:
C# ITestCommand类代码示例发布时间:2022-05-24
下一篇:
C# ITestCase类代码示例发布时间:2022-05-24
热门推荐
阅读排行榜

扫描微信二维码

查看手机版网站

随时了解更新最新资讯

139-2527-9053

在线客服(服务时间 9:00~18:00)

在线QQ客服
地址:深圳市南山区西丽大学城创智工业园
电邮:jeky_zhao#qq.com
移动电话:139-2527-9053

Powered by 互联科技 X3.4© 2001-2213 极客世界.|Sitemap