Freigeben über


PexExceptionValidatorAttributeBase Class

Definition

Base class for Exception validators

public ref class PexExceptionValidatorAttributeBase abstract : Microsoft::Pex::Framework::Packages::PexExplorationPackageAttributeBase, Microsoft::Pex::Engine::Exceptions::IPexExceptionValidator
[System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)]
public abstract class PexExceptionValidatorAttributeBase : Microsoft.Pex.Framework.Packages.PexExplorationPackageAttributeBase, Microsoft.Pex.Engine.Exceptions.IPexExceptionValidator
[<System.AttributeUsage(System.AttributeTargets.Assembly | System.AttributeTargets.Class | System.AttributeTargets.Method, AllowMultiple=true, Inherited=true)>]
type PexExceptionValidatorAttributeBase = class
    inherit PexExplorationPackageAttributeBase
    interface IPexExceptionValidator
Public MustInherit Class PexExceptionValidatorAttributeBase
Inherits PexExplorationPackageAttributeBase
Implements IPexExceptionValidator
Inheritance
Derived
Attributes
Implements
Microsoft.Pex.Engine.Exceptions.IPexExceptionValidator

Constructors

PexExceptionValidatorAttributeBase()

Initializes a new instance of the PexExceptionValidatorAttributeBase class.

Properties

AcceptInnerException

Gets or sets a value indicating whether inner exception should be inspected.

Description

Describes what this validator does.

Documented

Gets or sets a value indicating whether the exception type should be documented

Host

Gets the exploration host

MessageFilter

Gets or sets a message filter; uses the default naming conventions for filters.

Name

Gets the name of this package.

(Inherited from PexExplorationPackageAttributeBase)
OnlyAtTypeUnderTestSurface

Gets or sets whether this exception validator only applies to exceptions that have been thrown at the surface of the type-under-test.

TrimStackTraceBeforeContractRuntime

Gets or sets a value indicating whether the filtered stack trace should be cut before the first call to the Code Contract runtime method

TypeUnderTest

Gets the type-under-test, if any.

WikiTopic

Gets the wiki topic.

Methods

AfterExploration(IPexExplorationComponent, Object)

Callback that is executed after the exploration ends.

AppendDescription(SafeStringBuilder)

Appends to the description.

BeforeExploration(IPexExplorationComponent)

Callback that is executed before the exploration starts.

Decorate(Name, IPexDecoratedComponentElement)

This method can announce filters, focuses, and packages to IntelliTest.

(Inherited from PexExplorationPackageAttributeBase)
Describe(MetadataEntity)

Describes the specified type.

FilterStackTrace(Exception, ContractsMetadata+ContractFailureKind)

Filters the stacktrace

Initialize(IPexExplorationEngine)

Initializes the specified exploration package. May interact with services.

(Inherited from PexExplorationPackageAttributeBase)
IsDefinedInTypeUnderTest(MethodDefinition)

Whether the given method is defined in the type under test.

IsExceptionDocumented(TypeEx, MethodDefinition[])

Determines whether the exception is documented on any method present in the stack trace

IsExceptionLocationValid(Exception, MethodDefinition[], ContractsMetadata+ContractFailureKind)

Determines whether the exception location is allowed.

IsExceptionMessageValid(String)

Determines whether the exception message is valid.

IsExceptionTypeValid(TypeEx)

Determines whether the exception type is allowed.

IsExceptionValid(Exception)

Determines whether the exception instance is allowed.

IsSourceValid(String)

Determines whether the source assembly is allowed.

IsStackTraceValid(Exception, MethodDefinition[], ContractsMetadata+ContractFailureKind)

Determines whether the stack trace of an exception is allowed.

IsTargetSiteValid(MethodDefinition)

Determines whether the target method is allowed.

Load(IContainer)

This method provides the opportunity install or substitute services.

(Inherited from PexExplorationPackageAttributeBase)
MarkTest(Exception, MethodDefinitionBuilder)

Gets the opportunity to annotate the test with more information about the exception. By default, does nothing.

Validate(Exception, String, String)

Gets a value indicating whether this exception was expected

Validate(IPexLog, ICustomAttributeProviderEx, VisibilityContext)

Validates the attribute in a particular visibility context.

(Inherited from PexComponentElementDecoratorAttributeBase)

Explicit Interface Implementations

IPexComponentElementDecorator.Decorate(Name, IPexDecoratedComponentElement) (Inherited from PexComponentElementDecoratorAttributeBase)
IPexExplorationPackage.AfterExploration(IPexExplorationComponent, Object) (Inherited from PexExplorationPackageAttributeBase)
IPexExplorationPackage.BeforeExploration(IPexExplorationComponent) (Inherited from PexExplorationPackageAttributeBase)
IPexExplorationPackage.Initialize(IPexExplorationEngine) (Inherited from PexExplorationPackageAttributeBase)
IPexExplorationPackage.Load(IContainer) (Inherited from PexExplorationPackageAttributeBase)
IPexValidatable.Validate(IPexLog, ICustomAttributeProviderEx, VisibilityContext) (Inherited from PexComponentElementDecoratorAttributeBase)

Applies to