Freigeben über


PexAllowedExceptionAttributeBase Class

Definition

Specifies an exception that is allowed to occur. If the execption occurs, the generated test will be tagged with 'ExpectedException'.

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

Constructors

PexAllowedExceptionAttributeBase(Type)

Initializes a new instance of the PexAllowedExceptionAttributeBase class.

Properties

AcceptExceptionSubtypes

Gets or sets a value that determines whether exception should be checked by equality or sub-typing

AcceptInnerException

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

(Inherited from PexExceptionValidatorAttributeBase)
AllowedExceptionTypeDefinition

Gets the expected type of the exception.

Description

Describes what this validator does.

Documented

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

(Inherited from PexExceptionValidatorAttributeBase)
Host

Gets the exploration host

(Inherited from PexExceptionValidatorAttributeBase)
MessageFilter

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

(Inherited from PexExceptionValidatorAttributeBase)
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.

(Inherited from PexExceptionValidatorAttributeBase)
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

(Inherited from PexExceptionValidatorAttributeBase)
TypeUnderTest

Gets the type-under-test, if any.

(Inherited from PexExceptionValidatorAttributeBase)
WikiTopic

Gets the wiki topic.

(Inherited from PexExceptionValidatorAttributeBase)

Methods

AfterExploration(IPexExplorationComponent, Object)

Callback that is executed after the exploration ends.

(Inherited from PexExceptionValidatorAttributeBase)
AppendDescription(SafeStringBuilder)

Appends to the description.

BeforeExploration(IPexExplorationComponent)

Callback that is executed before the exploration starts.

(Inherited from PexExceptionValidatorAttributeBase)
Decorate(Name, IPexDecoratedComponentElement)

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

(Inherited from PexExplorationPackageAttributeBase)
Describe(MetadataEntity)

Describes the specified type.

(Inherited from PexExceptionValidatorAttributeBase)
FilterStackTrace(Exception, ContractsMetadata+ContractFailureKind)

Filters the stacktrace

(Inherited from PexExceptionValidatorAttributeBase)
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.

(Inherited from PexExceptionValidatorAttributeBase)
IsExceptionDocumented(TypeEx, MethodDefinition[])

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

(Inherited from PexExceptionValidatorAttributeBase)
IsExceptionLocationValid(Exception, MethodDefinition[], ContractsMetadata+ContractFailureKind)

Determines whether the exception location is allowed.

(Inherited from PexExceptionValidatorAttributeBase)
IsExceptionMessageValid(String)

Determines whether the exception message is valid.

(Inherited from PexExceptionValidatorAttributeBase)
IsExceptionTypeValid(TypeEx)

Determines whether the exception type is allowed.

IsExceptionValid(Exception)

Determines whether the exception instance is allowed.

(Inherited from PexExceptionValidatorAttributeBase)
IsSourceValid(String)

Determines whether the source assembly is allowed.

(Inherited from PexExceptionValidatorAttributeBase)
IsStackTraceValid(Exception, MethodDefinition[], ContractsMetadata+ContractFailureKind)

Determines whether the stack trace of an exception is allowed.

(Inherited from PexExceptionValidatorAttributeBase)
IsTargetSiteValid(MethodDefinition)

Determines whether the target method is allowed.

(Inherited from PexExceptionValidatorAttributeBase)
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.

(Inherited from PexExceptionValidatorAttributeBase)
Validate(Exception, String, String)

Gets a value indicating whether this exception was expected

(Inherited from PexExceptionValidatorAttributeBase)
Validate(IPexLog, ICustomAttributeProviderEx, VisibilityContext)

Validates the attribute in a particular visibility context.

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