Beispiel #1
0
        public void Cancel_CanBeCalledWhenDisposed()
        {
            // Arrange
            var op = new AsyncResult(AsyncOperationStatus.RanToCompletion);

            op.Dispose();

            // Act/Assert
            op.Cancel();
        }
Beispiel #2
0
        public void Cancel_DefaultImplementationDoesNothing()
        {
            // Arrange
            var op = new AsyncResult();

            // Act
            op.Cancel();

            // Assert
            Assert.False(op.IsCompleted);
        }