Class PropertyAttribute
PropertyAttribute is used to attach information to a test as a name/value pair..
[AttributeUsage(AttributeTargets.Assembly|AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = true, Inherited = true)]
public class PropertyAttribute : NUnitAttribute, IApplyToTest
- Inheritance
-
PropertyAttribute
- Implements
- Derived
- Inherited Members
Constructors
PropertyAttribute()
Constructor for derived classes that set the property dictionary directly.
protected PropertyAttribute()
PropertyAttribute(object)
Constructor for use by derived classes that use the name of the type as the property name. Derived classes must ensure that the Type of the property value is a standard type supported by the BCL. Any custom types will cause a serialization Exception when in the client.
protected PropertyAttribute(object propertyValue)
Parameters
propertyValue
object
PropertyAttribute(string, double)
Construct a PropertyAttribute with a name and double value
public PropertyAttribute(string propertyName, double propertyValue)
Parameters
PropertyAttribute(string, int)
Construct a PropertyAttribute with a name and int value
public PropertyAttribute(string propertyName, int propertyValue)
Parameters
PropertyAttribute(string, string)
Construct a PropertyAttribute with a name and string value
public PropertyAttribute(string propertyName, string propertyValue)
Parameters
Properties
Properties
Gets the property dictionary for this attribute
public IPropertyBag Properties { get; }
Property Value
Methods
ApplyToTest(Test)
Modifies a test by adding properties to it.
public virtual void ApplyToTest(Test test)
Parameters
test
TestThe test to modify