public void ThrowsAnExceptionAfterBeingDisposed()
        {
            var target = new OneOrMoreThreadsPerResourcePolicy(1);

            target.Dispose();

            Assert.ThrowsAsync <ObjectDisposedException>(async() => await target.AcquireLockAsync(CancellationToken.None));
        }
        public async Task PreventMultipleThreadsFromAccessingTheResource()
        {
            using var target = new OneOrMoreThreadsPerResourcePolicy(1);
            await target.AcquireLockAsync(CancellationToken.None);

            cancellationSource.CancelAfter(1000);

            Assert.ThrowsAsync <OperationCanceledException>(async() => await target.AcquireLockAsync(cancellationSource.Token));
        }