public void GetLatestDownloadUrl()
        {
            //---------------Set up test pack-------------------
            var sut = new XDADownloader();
            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var result = sut.GetLatestDownload();

            //---------------Test Result -----------------------
            Console.WriteLine(result);
        }
        public void DownloadLatestTo()
        {
            //---------------Set up test pack-------------------
            var sut = new XDADownloader();

            //---------------Assert Precondition----------------

            //---------------Execute Test ----------------------
            var dstFile = sut.DownloadLatestTo("C:\\tmp");

            //---------------Test Result -----------------------
            Console.WriteLine("Done: {0}", dstFile);
        }
Exemple #3
0
        private static int DownloadLatest(int projectId, string dstFolder)
        {
            var downloader = new XDADownloader();

            try
            {
                downloader.ProjectId = projectId;
                downloader.DownloadLatestTo(dstFolder);
            }
            catch (Exception ex)
            {
                return(ExitWithError("Download fails: " + ex.Message));
            }
            return(0);
        }