Exemple #1
0
        public void Cancel_Upfront()
        {
            var cts = new CancellationTokenSource();

            cts.Cancel();

            var cs = new MaybeSubject <int>();

            var task = cs
                       .ToTask(cts);

            Assert.False(cs.HasObserver());
            Assert.True(task.IsCanceled);
        }