From d7eb6f5e641a26ad20fd610dc760b8191a08bd63 Mon Sep 17 00:00:00 2001 From: Mister_Nebula <41904486+misternebula@users.noreply.github.com> Date: Tue, 1 Feb 2022 15:42:20 +0000 Subject: [PATCH] remove unused UnitTestDetector --- QSB/Utility/UnitTestDetector.cs | 17 ----------------- QSBTests/UtilityTests.cs | 13 ------------- 2 files changed, 30 deletions(-) delete mode 100644 QSB/Utility/UnitTestDetector.cs delete mode 100644 QSBTests/UtilityTests.cs diff --git a/QSB/Utility/UnitTestDetector.cs b/QSB/Utility/UnitTestDetector.cs deleted file mode 100644 index 0d90da39..00000000 --- a/QSB/Utility/UnitTestDetector.cs +++ /dev/null @@ -1,17 +0,0 @@ -using System; -using System.Linq; - -namespace QSB.Utility -{ - public static class UnitTestDetector - { - public static readonly bool IsInUnitTest; - - static UnitTestDetector() - { - const string testAssemblyName = "Microsoft.VisualStudio.TestPlatform.TestFramework"; - IsInUnitTest = AppDomain.CurrentDomain.GetAssemblies() - .Any(a => a.FullName.StartsWith(testAssemblyName)); - } - } -} \ No newline at end of file diff --git a/QSBTests/UtilityTests.cs b/QSBTests/UtilityTests.cs deleted file mode 100644 index e6f3af59..00000000 --- a/QSBTests/UtilityTests.cs +++ /dev/null @@ -1,13 +0,0 @@ -using Microsoft.VisualStudio.TestTools.UnitTesting; -using QSB.Utility; - -namespace QSBTests -{ - [TestClass] - public class UtilityTests - { - [TestMethod] - public void IsInUnitTest() - => Assert.IsTrue(UnitTestDetector.IsInUnitTest, "UnitTestDetector is not working."); - } -}