Beispiel #1
0
        protected override void When()
        {
            var cancellationTokenSource = new CancellationTokenSource();

            Log.StartedCallback += (sender, args) => cancellationTokenSource.Cancel();
            TfChunkScavenger.Scavenge(false, true, 0, cancellationTokenSource.Token).Wait();
        }
Beispiel #2
0
        protected override void When()
        {
            var cancellationTokenSource = new CancellationTokenSource();

            Log.CompletedCallback += (sender, args) => { throw new Exception("Expected exception."); };
            TfChunkScavenger.Scavenge(true, true, 0, cancellationTokenSource.Token).Wait();
        }
Beispiel #3
0
        protected override async Task When()
        {
            var cancellationTokenSource = new CancellationTokenSource();

            cancellationTokenSource.Cancel();
            await TfChunkScavenger.Scavenge(false, true, 0, cancellationTokenSource.Token);
        }
Beispiel #4
0
        protected override async Task When()
        {
            var cancellationTokenSource = new CancellationTokenSource();

            Log.ChunkScavenged += (sender, args) => cancellationTokenSource.Cancel();
            await TfChunkScavenger.Scavenge(true, true, 0, cancellationTokenSource.Token);
        }
        protected override void When()
        {
            var cancellationTokenSource = new CancellationTokenSource();

            cancellationTokenSource.Cancel();
            TfChunkScavenger.Scavenge(false, true, 0, cancellationTokenSource.Token).Wait();
        }
Beispiel #6
0
        protected override Task When()
        {
            var cancellationTokenSource = new CancellationTokenSource();

            Log.ChunkScavenged += (sender, args) => {
                if (args.Scavenged)
                {
                    throw new Exception("Expected exception.");
                }
            };

            return(TfChunkScavenger.Scavenge(true, true, 0, cancellationTokenSource.Token));
        }
Beispiel #7
0
        protected override Task When()
        {
            var cancellationTokenSource = new CancellationTokenSource();

            return(TfChunkScavenger.Scavenge(true, true, 1, cancellationTokenSource.Token));
        }