Why does this test fail?
[Test]
public async Task Test_Keeps_SynchronizationContext()
{
    SynchronizationContext.Current.Should().NotBeNull(); // OK
    await Task.Delay(1).ConfigureAwait(true);
    SynchronizationContext.Current.Should().NotBeNull(); // FAIL
}
(NUnit 3.13.3 on .NET 7.0)
 
                        
I found out that this is just the case for multi-threaded apartments. To fix this and keep the
SynchronizationContext, you'll need to enter a single-threaded apartment by adding theApartmentAttribute: