private static async Task SemaphoreYieldAndRelease(SemaphoreSlim semaphore) { await Task.Yield(); var scope = new AssertionScope(); semaphore.Release(); scope.Should().BeSameAs(AssertionScope.Current); }