PexAssumeNotNullAttribute Class
This attribute expresses that the governed value cannot be 'null'.
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::PexAssumeNotNullAttribute
| 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.) |
It can be attached on
a parameter of a parameterized test method.
// assume foo is not null [PexMethod] public void SomeTest([PexAssumeNotNull]IFoo foo, ...) {}a field,
public class Foo { // this field should not be null [PexAssumeNotNull] public object Bar; }or a type.
// never consider null for Foo types [PexAssumeNotNull] public class Foo {}
It can also be attached to a test assembly, test fixture or test method; in this case the first arguments must indicate to which field or type the assumptions apply. When the attribute applies to a type, then it applies to all fields with this formal type.
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.



