Information
The topic you requested is included in another documentation set. For convenience, it's displayed below. Choose Switch to see the topic in its original location.

PexAssumeUnderTestAttribute Class

 

Attribute used to specify that a parameter from a parameterized test is the instance under test. Under this assumption, Pex ensure that the parameter is not null and it matches the type precisely:

Namespace:   Microsoft.Pex.Framework
Assembly:  Microsoft.Pex.Framework (in Microsoft.Pex.Framework.dll)


[AttributeUsageAttribute(AttributeTargets::All, AllowMultiple = true, 
	Inherited = true)]
public ref class PexAssumeUnderTestAttribute sealed : PexAssumeAttributeBase

NameDescription
System_CAPS_pubpropertyName

Gets the name of this package.(Inherited from PexExplorationPackageAttributeBase.)

System_CAPS_pubpropertyTypeId

(Inherited from Attribute.)

void Test([PexAssumeUnderTest]Foo target, int value) {
// precondition: target is under test, we don't care about a null value
    target.Bar(value);
}

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Return to top
Show: