Exemplo n.º 1
0
        public async Task RequestInEndgame_AllDoNotDownload()
        {
            foreach (var file in torrentManager.Files)
            {
                await torrentManager.SetFilePriorityAsync(file, Priority.DoNotDownload);
            }

            torrentManager.Bitfield.SetAll(true).Set(0, false);
            peers[0].BitField.SetAll(true);
            peers[0].IsChoking = false;

            manager.AddPieceRequests(peers[0]);
            Assert.AreEqual(0, peers[0].AmRequestingPiecesCount, "#1");
            Assert.AreEqual(0, peers[0].MessageQueue.QueueLength, "#2");
        }