PexAllowedContractRequiresFailureAttribute Class

Definition

Allows failures of code contracts requires clauses.

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

Constructors

PexAllowedContractRequiresFailureAttribute()

Allows failures of code contracts requires clauses,

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

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

(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.

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

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

(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