public void GetReadConnectionSourceAsync_should_get_the_connection_source_from_the_read_binding() { var subject = new SplitReadWriteBinding(_readBinding, _writeBinding); subject.GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None); _readBinding.Received().GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None); }
public void GetReadConnectionSourceAsync_should_get_the_connection_source_from_the_read_binding() { var subject = new SplitReadWriteBinding(_readBinding, _writeBinding); subject.GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None); _readBinding.Received().GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None); }
public void GetReadConnectionSourceAsync_should_throw_if_disposed() { var subject = new SplitReadWriteBinding(_readBinding, _writeBinding); subject.Dispose(); Action act = () => subject.GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None); act.ShouldThrow<ObjectDisposedException>(); }
public void GetReadConnectionSourceAsync_should_throw_if_disposed() { var subject = new SplitReadWriteBinding(_readBinding, _writeBinding); subject.Dispose(); Action act = () => subject.GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None); act.ShouldThrow <ObjectDisposedException>(); }