XFE Git
XFE Studio Git
Git 首页 全局搜索
XFE 主站 文档 NuGet

XFEExtension.NetCore.XUnit

【DLL】提供方便快捷的测试,无需编写Main方法,可直接添加特性在类或方法上进行测试

公开
关注 0 Fork 0 Star 0
UTF-8
namespace XFEExtension.NetCore.XUnit.Attributes;

/// <summary>
/// 将测试类加入具名集合,使同一集合中的类共享串行调度和集合级 Fixture 范围。
/// </summary>
/// <param name="name">集合名称。</param>
[AttributeUsage(AttributeTargets.Class)]
public sealed class CollectionAttribute(string name) : Attribute
{
    /// <summary>
    /// 获取集合名称。
    /// </summary>
    public string Name { get; } = name;
}