namespace XFEExtension.NetCore.XUnit; /// /// 方法测试,可自定义名称 /// [AttributeUsage(AttributeTargets.Method, AllowMultiple = true)] public sealed class MNTestAttribute : MTestAttribute { /// /// 方法别名 /// public string? MethodOtherName { get; set; } /// /// 方法测试 /// /// 方法别名 /// 传参 public MNTestAttribute(string methodOtherName, params object[] values) { MethodOtherName = methodOtherName; Params = values; } /// /// 方法测试 /// /// 方法别名 public MNTestAttribute(string methodOtherName) { MethodOtherName = methodOtherName; } /// /// 方法测试 /// public MNTestAttribute() { } }