public void Setup() { id.BitField.SetAll(true); tester = new TestPicker(); picker = new PriorityPicker(tester); picker.Initialise(rig.Manager.Bitfield, rig.Torrent.Files, new List <Piece>()); foreach (TorrentFile file in rig.Torrent.Files) { file.Priority = Priority.Normal; } }
public void Setup() { rig = TestRig.CreateMultiFile(); id = new PeerId(new Peer(new string('a', 20), new Uri("tcp://BLAH")), rig.Manager); id.BitField.SetAll(true); tester = new TestPicker(); picker = new PriorityPicker(tester); picker.Initialise(rig.Manager.Bitfield, rig.Torrent.Files, new List <Piece>()); foreach (TorrentFile file in rig.Torrent.Files) { file.Priority = Priority.Normal; } }