remove unused UnitTestDetector

This commit is contained in:
Mister_Nebula 2022-02-01 15:42:20 +00:00
parent 19579a156c
commit d7eb6f5e64
2 changed files with 0 additions and 30 deletions

View File

@ -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));
}
}
}

View File

@ -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.");
}
}