public void MultiFile()
        {
            picker.Initialise(multiBitfield, multiFile, Enumerable.Empty <Piece> ());

            picker.PickPiece(multiPeer, multiBitfield, peers);
            Assert.AreEqual(1, tester.PickPieceBitfield.Count, "#1");
            Assert.IsTrue(tester.PickPieceBitfield[0].AllTrue, "#2");
            Assert.IsTrue(picker.IsInteresting(multiBitfield), "#3");
        }
Esempio n. 2
0
        public void MultiFile()
        {
            picker.Initialise(multiFile);

            picker.PickPiece(multiPeer, multiBitfield, peers, 1, 0, multiBitfield.Length - 1);
            Assert.AreEqual(1, checker.Picks.Count, "#1");
            Assert.IsTrue(checker.Picks[0].available.AllTrue, "#2");
            Assert.IsTrue(picker.IsInteresting(multiPeer, multiBitfield), "#3");
        }
 public void AllAllowed()
 {
     picker.PickPiece(id, id.BitField, new List <PeerId>(), 1, 0, rig.Pieces);
     Assert.AreEqual(1, tester.PickPieceBitfield.Count, "#1");
     Assert.IsTrue(tester.PickPieceBitfield[0].AllTrue, "#2");
 }