using NUnit.Framework; using System.Linq; namespace System.Application { public class DISafeGetTest { [Test] public void Reflection() { var methods = typeof(DISafeGet).GetMethods().Where(x => x.IsStatic && x.GetParameters().Length == 0); foreach (var method in methods) { try { method.Invoke(null, Array.Empty()); } catch (Exception e) { throw new Exception($"method.Invoke fail, name: {method.Name}", e); } } } } }