public void EnqueueDownloadConvertToJSONObjectPassingTest() { var jsonTest = new Uri("http://echo.jsontest.com/testKey/testValue/testKey2/testValue2/"); var downloader = new MediaDripDownloader(); //var source = new BasicSourceTest(ExpectedDownloadReturnType.AsJson); //downloader.AddSource(source); // the output is useless since we're only passing the data into an object // so we'll just pass the input address to the output downloader.Enqueue(jsonTest, jsonTest); }
public void QueueChangedEventDisposePassingTest() { var downloader = new MediaDripDownloader(); downloader.OnCollectionChanged += OnQueueChanged_Event; downloader.Enqueue(new DownloadObject(_testAddress, _testAddress)); Assert.NotEmpty(downloader.Items); downloader.Dispose(); Assert.True(downloader.IsDisposalRequested); Assert.True(_eventFired); }