Class SingleThreadedAttribute
Marks a test fixture as requiring all child tests to be run on the same thread as the OneTimeSetUp and OneTimeTearDown. A flag in the TestExecutionContext is set forcing all child tests to be run sequentially on the current thread. Any ParallelScope setting is ignored.
Implements
Inherited Members
Namespace: NUnit.Framework
Assembly: nunit.framework.dll
Syntax
[AttributeUsage(AttributeTargets.Class, AllowMultiple = false, Inherited = true)]
public class SingleThreadedAttribute : NUnitAttribute, IApplyToContext
Constructors
View SourceSingleThreadedAttribute()
Declaration
public SingleThreadedAttribute()
Methods
View SourceApplyToContext(TestExecutionContext)
Apply changes to the TestExecutionContext
Declaration
public void ApplyToContext(TestExecutionContext context)
Parameters
Type | Name | Description |
---|---|---|
TestExecutionContext | context | The TestExecutionContext |