コード例 #1
0
        public void GetReadConnectionSourceAsync_should_delegate_to_reference()
        {
            var subject = new ReadWriteBindingHandle(_readWriteBinding);

            subject.GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None);

            _readWriteBinding.Received().GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None);
        }
コード例 #2
0
        public void GetReadConnectionSourceAsync_should_delegate_to_reference()
        {
            var subject = new ReadWriteBindingHandle(_readWriteBinding);

            subject.GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None);

            _readWriteBinding.Received().GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None);
        }
コード例 #3
0
        public void GetReadConnectionSourceAsync_should_throw_if_disposed()
        {
            var subject = new ReadWriteBindingHandle(_readWriteBinding);
            subject.Dispose();

            Action act = () => subject.GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None);

            act.ShouldThrow<ObjectDisposedException>();
        }
コード例 #4
0
        public void GetReadConnectionSourceAsync_should_throw_if_disposed()
        {
            var subject = new ReadWriteBindingHandle(_readWriteBinding);

            subject.Dispose();

            Action act = () => subject.GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None);

            act.ShouldThrow <ObjectDisposedException>();
        }