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:
Assembly: Microsoft.Pex.Framework (in Microsoft.Pex.Framework.dll)
System::Attribute
Microsoft.Pex.Framework::PexAttributeBase
Microsoft.Pex.Framework.ComponentModel::PexComponentElementDecoratorAttributeBase
Microsoft.Pex.Framework.Packages::PexExplorationPackageAttributeBase
Microsoft.Pex.Framework.Domains::PexDomainAttributeBase
Microsoft.Pex.Framework::PexAssumeAttributeBase
Microsoft.Pex.Framework::PexAssumeUnderTestAttribute
| Name | Description | |
|---|---|---|
![]() | PexAssumeUnderTestAttribute() |
| Name | Description | |
|---|---|---|
![]() | Name | Gets the name of this package.(Inherited from PexExplorationPackageAttributeBase.) |
![]() | TypeId | (Inherited from Attribute.) |
| Name | Description | |
|---|---|---|
![]() | Equals(Object^) | (Inherited from Attribute.) |
![]() | GetHashCode() | (Inherited from Attribute.) |
![]() | GetType() | (Inherited from Object.) |
![]() | IsDefaultAttribute() | (Inherited from Attribute.) |
![]() | Match(Object^) | (Inherited from Attribute.) |
![]() | ToString() | (Inherited from Object.) |
![]() | TryGetInvariant(IPexExplorationComponent^, Layout^, Converter<Term^, Term^>^) | |
![]() | UpdateTarget(PexDomainTarget, MetadataEntity^, Int32) | Updates the target of this domain.(Inherited from PexDomainAttributeBase.) |
| Name | Description | |
|---|---|---|
![]() ![]() | _Attribute::GetIDsOfNames(Guid, IntPtr, UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::GetTypeInfo(UInt32, UInt32, IntPtr) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::GetTypeInfoCount(UInt32) | (Inherited from Attribute.) |
![]() ![]() | _Attribute::Invoke(UInt32, Guid, UInt32, Int16, IntPtr, IntPtr, IntPtr, IntPtr) | (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.



