<PackageReference Include="NUnit" Version="3.5.0" />

SingleThreadedAttribute

SingleThreadedAttribute applies to a test fixture and indicates that all the child tests must be run on the same thread as the OneTimeSetUp and OneTimeTearDown. It sets a flag in the TestExecutionContext and forces all tests to be run sequentially on the current thread. Any ParallelScope setting is ignored.

public void ApplyToContext(TestExecutionContext context)

Apply changes to the TestExecutionContext