Files
2021-05-05 18:35:23 +08:00

26 lines
653 B
C#

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<object>());
}
catch (Exception e)
{
throw new Exception($"method.Invoke fail, name: {method.Name}", e);
}
}
}
}
}