public void Seek_CalledWhenPaused_DoesntDemuxNextPacket() { AsyncContext.Run(async() => { var demuxerMock = Substitute.For <IDemuxer>(); demuxerMock.IsInitialized().Returns(true); using (var controller = new DemuxerController(demuxerMock)) { controller.Pause(); await controller.Seek(TimeSpan.FromSeconds(5), CancellationToken.None); await demuxerMock.DidNotReceive().NextPacket(); } }); }
public void Pause_Called_DoesntRetrieveNextPacket(StartType startType) { AsyncContext.Run(async() => { var demuxerMock = Substitute.For <IDemuxer>(); demuxerMock.IsInitialized().Returns(true); using (var controller = new DemuxerController(demuxerMock)) { StartController(controller, startType); controller.Pause(); await Task.Yield(); await demuxerMock.DidNotReceive().NextPacket(); } }); }