Beispiel #1
0
        public void Test_RustDownloadingWithLogger()
        {
            Directory.SetCurrentDirectory(_directory);
            _config = new DownloadConfig()
            {
                AppID = 258550,
                DownloadAllPlatforms = false,
                InstallDirectory     = ".temp",
                UsingFileList        = true,
                FilesToDownloadRegex = new List <Regex>()
                {
                    _rustFilesRegex
                },
                SavePathProcessor = SavePathProcessor
            };
            _config.OnMessageEvent        += (type, message) => Console.WriteLine($"[{type}] {message}");
            _config.OnReportProgressEvent += (message) => Console.WriteLine($"[Progress] {message}");
            var downloader = new global::DepotDownloader.DepotDownloader(_config);

            downloader.Download(true);

            downloader.ClearCache();
            Assert.IsFalse(Directory.Exists(".temp\\.DepotDownloader"));
            Directory.Delete(".temp", true);
        }
Beispiel #2
0
        public void Test_RustDownloading()
        {
            Directory.SetCurrentDirectory(_directory);
            _config = new DownloadConfig()
            {
                AppID = 258550,
                DownloadAllPlatforms = false,
                InstallDirectory     = ".temp",
                UsingFileList        = true,
                FilesToDownloadRegex = new List <Regex>()
                {
                    _rustFilesRegex
                },
                SavePathProcessor = SavePathProcessor,
            };
            var downloader = new global::DepotDownloader.DepotDownloader(_config);

            downloader.Download(true);

            downloader.ClearCache();
            Assert.IsFalse(Directory.Exists(".temp\\.DepotDownloader"));
            Directory.Delete(".temp", true);
        }