public void GetReadChannelSourceAsync_should_get_the_connection_source_from_the_read_binding() { var subject = new SplitReadWriteBinding(_readBinding, _writeBinding); subject.GetReadChannelSourceAsync(CancellationToken.None); _readBinding.Received().GetReadChannelSourceAsync(CancellationToken.None); }
public void GetReadConnectionSourceAsync_should_delegate_to_reference() { var subject = new ReadBindingHandle(_readBinding); subject.GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None); _readBinding.Received().GetReadConnectionSourceAsync(Timeout.InfiniteTimeSpan, CancellationToken.None); }
public void GetReadChannelSourceAsync_should_delegate_to_reference() { var subject = new ReadBindingHandle(_readBinding); subject.GetReadChannelSourceAsync(CancellationToken.None); _readBinding.Received().GetReadChannelSourceAsync(CancellationToken.None); }
public void GetReadChannelSource_should_delegate_to_reference( [Values(false, true)] bool async) { var subject = new ReadBindingHandle(_readBinding); if (async) { subject.GetReadChannelSourceAsync(CancellationToken.None).GetAwaiter().GetResult(); _readBinding.Received().GetReadChannelSourceAsync(CancellationToken.None); } else { subject.GetReadChannelSource(CancellationToken.None); _readBinding.Received().GetReadChannelSource(CancellationToken.None); } }
public void GetReadChannelSource_should_get_the_connection_source_from_the_read_binding( [Values(false, true)] bool async) { var subject = new SplitReadWriteBinding(_readBinding, _writeBinding); if (async) { subject.GetReadChannelSourceAsync(CancellationToken.None).GetAwaiter().GetResult(); _readBinding.Received().GetReadChannelSourceAsync(CancellationToken.None); } else { subject.GetReadChannelSource(CancellationToken.None); _readBinding.Received().GetReadChannelSource(CancellationToken.None); } }