Class CancelAfterAttribute
Applies a timeout in milliseconds to a test. When applied to a method, the test's cancellation token is cancelled if the timeout is exceeded.
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
[AttributeUsage(AttributeTargets.Class|AttributeTargets.Method, AllowMultiple = false, Inherited = false)]
public class CancelAfterAttribute : PropertyAttribute, IApplyToTest, IApplyToContext
Remarks
The user has to monitor this cancellation token.
Constructors
View SourceCancelAfterAttribute(int)
Construct a CancelAfterAttribute given a time in milliseconds
Declaration
public CancelAfterAttribute(int timeout)
Parameters
Type | Name | Description |
---|---|---|
int | timeout | The timeout value in milliseconds |