mirror of
https://github.com/misternebula/quantum-space-buddies.git
synced 2025-01-01 03:32:38 +00:00
37 lines
919 B
C#
37 lines
919 B
C#
using Microsoft.VisualStudio.TestTools.UnitTesting;
|
|
|
|
namespace QSBTests
|
|
{
|
|
[TestClass]
|
|
public class PatchTests
|
|
{
|
|
//[TestMethod]
|
|
//public void CheckUnreferencedPatches()
|
|
//{
|
|
// var qsbAssembly = Assembly.Load("QSB");
|
|
// var allPatchTypes = qsbAssembly
|
|
// .GetTypes()
|
|
// .Where(x => typeof(QSBPatch).IsAssignableFrom(x) && !x.IsInterface && !x.IsAbstract);
|
|
|
|
// QSBPatchManager.Init();
|
|
// var patchInstances = (List<QSBPatch>)typeof(QSBPatchManager)
|
|
// .GetField("_patchList", BindingFlags.NonPublic | BindingFlags.Static)
|
|
// .GetValue(typeof(QSBPatchManager));
|
|
|
|
// var failedTypes = new List<Type>();
|
|
// foreach (var type in allPatchTypes)
|
|
// {
|
|
// if (!patchInstances.Any(x => x.GetType() == type))
|
|
// {
|
|
// failedTypes.Add(type);
|
|
// }
|
|
// }
|
|
|
|
// if (failedTypes.Count > 0)
|
|
// {
|
|
// Assert.Fail(string.Join(", ", failedTypes.Select(x => x.Name)));
|
|
// }
|
|
//}
|
|
}
|
|
}
|