Files
Project-M/Packages/com.rukhanka.animation/Rukhanka.Tests/TestToolbox.cs
T
2026-05-31 14:27:52 -07:00

25 lines
595 B
C#

using NUnit.Framework;
using System.Reflection;
/////////////////////////////////////////////////////////////////////////////////
namespace Rukhanka.Tests
{
public static class TestToolbox
{
public static MethodInfo GetStaticPrivateMethod<T>(string fnName)
{
if (string.IsNullOrWhiteSpace(fnName))
Assert.Fail("Function name cannot be empty");
var classType = typeof(T);
MethodInfo rv = classType.GetMethod(fnName, BindingFlags.Static | BindingFlags.NonPublic);
if (rv == null)
Assert.Fail(string.Format("{0} method not found", fnName));
return rv;
}
}
}