public async Task Save_WhenEtagIsNull_ThrowsArgumentNullException(
     FileSystemToggleCollectionCache cache,
     ToggleCollection toggleCollection
     )
 {
     await Assert.ThrowsAsync <ArgumentNullException>(() => cache.Save(toggleCollection, null, CancellationToken.None));
 }
 public async Task Save_WhenToggleCollectionIsNull_ThrowsArgumentNullException(
     FileSystemToggleCollectionCache cache,
     string etag
     )
 {
     await Assert.ThrowsAsync <ArgumentNullException>(() => cache.Save(null, etag, CancellationToken.None));
 }
        public async Task Save_WhenCancellationTokenIsCanceled_ThrowsOperationCancelledException(
            FileSystemToggleCollectionCache cache,
            ToggleCollection toggleCollection,
            string etag
            )
        {
            var cts = new CancellationTokenSource();

            cts.Cancel();

            await Assert.ThrowsAsync <OperationCanceledException>(() => cache.Save(toggleCollection, etag, cts.Token));
        }