zoukankan      html  css  js  c++  java
  • Xunit--FactAttribute特性

    Attribute that is applied to a method to indicate that it is a fact that should
    // be run by the test runner. It can also be extended to support a customized definition
    // of a test method.


    应用于方法的属性,指示该事实是应该,由测试跑步者运行。 也可以扩展以支持自定义定义测试方法。

    #region 程序集 xunit.core, Version=2.4.1.0, Culture=neutral, PublicKeyToken=8d05b1bb7a6fdb6c
    // C:UsersAdministrator.nugetpackagesxunit.extensibility.core2.4.1lib
    etstandard1.1xunit.core.dll
    #endregion
    
    using System;
    using Xunit.Sdk;
    
    namespace Xunit
    {
        //
        // 摘要:
        //     Attribute that is applied to a method to indicate that it is a fact that should
        //     be run by the test runner. It can also be extended to support a customized definition
        //     of a test method.
        [AttributeUsage(AttributeTargets.Method, AllowMultiple = false)]
        [XunitTestCaseDiscoverer("Xunit.Sdk.FactDiscoverer", "xunit.execution.{Platform}")]
        public class FactAttribute : Attribute
        {
            public FactAttribute();
    
            //
            // 摘要:
            //     Gets the name of the test to be used when the test is skipped. Defaults to null,
            //     which will cause the fully qualified test name to be used.
            public virtual string DisplayName { get; set; }
            //
            // 摘要:
            //     Marks the test so that it will not be run, and gets or sets the skip reason
            public virtual string Skip { get; set; }
            //
            // 摘要:
            //     Marks the test as having a timeout, and gets or sets the timeout (in milliseconds).
            //     WARNING: Using this with parallelization turned on will result in undefined behavior.
            //     Timeout is only supported when parallelization is disabled, either globally or
            //     with a parallelization-disabled test collection.
            public virtual int Timeout { get; set; }
        }
    }


    DisplayName

     获取跳过测试时要使用的测试的名称。 默认为空,
     这将导致使用完全合格的测试名称。

    skip

    标记测试,使其不会运行,并获取或设置跳过原因

    Timeout

    将测试标记为有超时,并获取或设置超时(以毫秒为单位)。
    警告:在启用并行化的情况下使用此命令将导致未定义的行为。
    仅在全局或禁用并行化的测试集合禁用并行化时才支持超时。

  • 相关阅读:
    pads layout模块复用-两个不同功能的复用模块功能
    摘抄:一个电容都能讲得如此全面实用,不分享就太可惜了!
    layout需要非常了解清楚的内容
    摘抄:一篇文章看看能不能讲透“阻抗匹配”
    python2.7/3.7安装NumPy函数库的一种方法及小心得
    3.C#基础之基本概念(完成)
    2.C#基础之词法结构(完成)
    .NET、.NET框架、ASP.NET和C#的关系(完成)
    1.C#基础之简介(完成)
    2.LINQ(新手写的!新手写的!新手写的!)(未完成)
  • 原文地址:https://www.cnblogs.com/Tpf386/p/12190752.html
Copyright © 2011-2022 走看看