public void GetChannel_should_throw_when_not_initialized( [Values(false, true)] bool async) { Action act; if (async) { act = () => _subject.GetChannelAsync(CancellationToken.None).GetAwaiter().GetResult(); } else { act = () => _subject.GetChannel(CancellationToken.None); } act.ShouldThrow <InvalidOperationException>(); }
public void GetChannelAsync_should_throw_when_not_initialized() { Action act = () => _subject.GetChannelAsync(CancellationToken.None).Wait(); act.ShouldThrow <InvalidOperationException>(); }