Пример #1
0
        public void Test2()
        {
            List <List <InactiveRequest> > temp  = new List <List <InactiveRequest> >();
            List <InactiveRequest>         temp2 = new List <InactiveRequest>();

            temp2.Add(new InactiveRequest(0, 2));
            temp.Add(temp2);

            List <string>       events         = new List <string>();
            DummyStorageWrapper ds             = new DummyStorageWrapper(temp);
            NormalDownloader    downloader     = new NormalDownloader(ds, new PiecePicker(ds.Active.Count), 2, 15, 1, new Measure(15), 10, null);
            SingleDownload      singleDownload = downloader.MakeDownload(new DummyConnection(events));

            Assert.AreEqual(0, events.Count);
            singleDownload.GetUnchoke();
            singleDownload.GetHave(0);
            events.Clear();
            singleDownload.Disconnect();
        }