Ejemplo n.º 1
0
        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();
                }
            });
        }
Ejemplo n.º 2
0
        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();
                }
            });
        }