PexMethodUnderTestAttribute 类

定义

指定用于当前探索的预期待测试方法。 此属性用于探索需要反射的私有方法。 通常情况下,此信息可以通过读取方法主体字节代码进行挖掘,但在涉及与反射有关的私有方法调用时,我们需要此属性。

public ref class PexMethodUnderTestAttribute sealed : Microsoft::Pex::Framework::PexAttributeBase
[System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)]
public sealed class PexMethodUnderTestAttribute : Microsoft.Pex.Framework.PexAttributeBase
[<System.AttributeUsage(System.AttributeTargets.Method, AllowMultiple=true, Inherited=false)>]
type PexMethodUnderTestAttribute = class
    inherit PexAttributeBase
Public NotInheritable Class PexMethodUnderTestAttribute
Inherits PexAttributeBase
继承
PexMethodUnderTestAttribute
属性

注解

此特性要求用 "TypeUnderTest" 设置批注测试类。

构造函数

PexMethodUnderTestAttribute(String)

指定待测试方法

属性

MethodUnderTest

获取待测试成员

适用于