diff --git a/Compression.BSA.Test/App.config b/Compression.BSA.Test/App.config
deleted file mode 100644
index d1d97acc..00000000
--- a/Compression.BSA.Test/App.config
+++ /dev/null
@@ -1,7 +0,0 @@
-
-
-
-
-
-
-
\ No newline at end of file
diff --git a/Compression.BSA.Test/BSATests.cs b/Compression.BSA.Test/BSATests.cs
new file mode 100644
index 00000000..75869179
--- /dev/null
+++ b/Compression.BSA.Test/BSATests.cs
@@ -0,0 +1,199 @@
+using System;
+using System.Collections.Generic;
+using System.IO;
+using System.Linq;
+using System.Runtime.Remoting.Channels;
+using System.Threading.Tasks;
+using Alphaleonis.Win32.Filesystem;
+using Microsoft.VisualStudio.TestTools.UnitTesting;
+using Newtonsoft.Json;
+using Wabbajack.Common;
+using Wabbajack.Lib.Downloaders;
+using Wabbajack.Lib.NexusApi;
+using Directory = Alphaleonis.Win32.Filesystem.Directory;
+using File = Alphaleonis.Win32.Filesystem.File;
+using FileInfo = Alphaleonis.Win32.Filesystem.FileInfo;
+using Path = Alphaleonis.Win32.Filesystem.Path;
+
+namespace Compression.BSA.Test
+{
+ [TestClass]
+ public class BSATests
+ {
+ private static string StagingFolder = "NexusDownloads";
+ private static string BSAFolder = "BSAs";
+ private static string TestDir = "BSA Test Dir";
+ private static string TempDir = "BSA Temp Dir";
+
+ public TestContext TestContext { get; set; }
+
+ [ClassInitialize]
+ public static void Setup(TestContext TestContext)
+ {
+
+ Utils.LogMessages.Subscribe(f => TestContext.WriteLine(f));
+ if (!Directory.Exists(StagingFolder))
+ Directory.CreateDirectory(StagingFolder);
+
+ if (!Directory.Exists(BSAFolder))
+ Directory.CreateDirectory(BSAFolder);
+
+ var mod_ids = new[]
+ {
+ (Game.SkyrimSpecialEdition, 12604), // SkyUI
+ (Game.Skyrim, 3863), // SkyUI
+ (Game.Skyrim, 51473), // iNeed
+ (Game.Fallout4, 22223) // 10mm SMG
+ };
+
+ mod_ids.Do(info =>
+ {
+ var filename = DownloadMod(info);
+ var folder = Path.Combine(BSAFolder, info.Item1.ToString(), info.Item2.ToString());
+ if (!Directory.Exists(folder))
+ Directory.CreateDirectory(folder);
+ FileExtractor.ExtractAll(filename, folder);
+ });
+
+ }
+
+ private static string DownloadMod((Game, int) info)
+ {
+ var client = new NexusApiClient();
+ var results = client.GetModFiles(info.Item1, info.Item2);
+ var file = results.FirstOrDefault(f => f.is_primary) ?? results.OrderByDescending(f => f.uploaded_timestamp).First();
+ var src = Path.Combine(StagingFolder, file.file_name);
+
+ if (File.Exists(src)) return src;
+
+ var state = new NexusDownloader.State
+ {
+ ModID = info.Item2.ToString(),
+ GameName = GameRegistry.Games[info.Item1].NexusName,
+ FileID = file.file_id.ToString()
+ };
+ state.Download(src);
+ return src;
+ }
+
+ public static IEnumerable