DownloaderTests cleanup

This commit is contained in:
erri120 2020-01-27 14:32:20 +01:00
parent 26b42cd0bc
commit 8b62eb42c3
No known key found for this signature in database
GPG Key ID: A8C0A18D8D4D3135

View File

@ -1,11 +1,8 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Threading.Tasks; using System.Threading.Tasks;
using System.Reactive.Disposables;
using System.Reactive.Linq; using System.Reactive.Linq;
using Alphaleonis.Win32.Filesystem; using Alphaleonis.Win32.Filesystem;
using CefSharp;
using CefSharp.OffScreen;
using Microsoft.VisualStudio.TestTools.UnitTesting; using Microsoft.VisualStudio.TestTools.UnitTesting;
using Wabbajack.Common; using Wabbajack.Common;
using Wabbajack.Common.StatusFeed; using Wabbajack.Common.StatusFeed;
@ -14,7 +11,6 @@ using Wabbajack.Lib.Downloaders;
using Wabbajack.Lib.LibCefHelpers; using Wabbajack.Lib.LibCefHelpers;
using Wabbajack.Lib.NexusApi; using Wabbajack.Lib.NexusApi;
using Wabbajack.Lib.Validation; using Wabbajack.Lib.Validation;
using Wabbajack.Lib.WebAutomation;
using File = Alphaleonis.Win32.Filesystem.File; using File = Alphaleonis.Win32.Filesystem.File;
using Game = Wabbajack.Common.Game; using Game = Wabbajack.Common.Game;
@ -306,7 +302,7 @@ namespace Wabbajack.Test
await converted.Download(new Archive { Name = "LoversLab Test.txt" }, filename); await converted.Download(new Archive { Name = "LoversLab Test.txt" }, filename);
Assert.AreEqual("eSIyd+KOG3s=", Utils.FileHash(filename)); Assert.AreEqual("eSIyd+KOG3s=", filename.FileHash());
Assert.AreEqual(File.ReadAllText(filename), "Cheese for Everyone!"); Assert.AreEqual(File.ReadAllText(filename), "Cheese for Everyone!");
} }
@ -334,7 +330,7 @@ namespace Wabbajack.Test
await converted.Download(new Archive { Name = "Vector Plexus Test.zip" }, filename); await converted.Download(new Archive { Name = "Vector Plexus Test.zip" }, filename);
Assert.AreEqual("eSIyd+KOG3s=", Utils.FileHash(filename)); Assert.AreEqual("eSIyd+KOG3s=", filename.FileHash());
Assert.AreEqual(File.ReadAllText(filename), "Cheese for Everyone!"); Assert.AreEqual(File.ReadAllText(filename), "Cheese for Everyone!");
} }