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); }
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>(); }
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>(); }