diff --git a/Assets/Tests/Editor/NewTestScript.cs b/Assets/Tests/Editor/NewTestScript.cs deleted file mode 100644 index 9de2f92..0000000 --- a/Assets/Tests/Editor/NewTestScript.cs +++ /dev/null @@ -1,26 +0,0 @@ -using System.Collections; -using NUnit.Framework; -using UnityEngine.TestTools; - -namespace Coffee.UIParticle.Editor.Tests -{ - public class NewTestScript - { - // A Test behaves as an ordinary method - [Test] - public void NewTestScriptSimplePasses() - { - // Use the Assert class to test conditions - } - - // A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use - // `yield return null;` to skip a frame. - [UnityTest] - public IEnumerator NewTestScriptWithEnumeratorPasses() - { - // Use the Assert class to test conditions. - // Use yield to skip a frame. - yield return null; - } - } -} diff --git a/Assets/Tests/Editor/ReflectionTests.cs b/Assets/Tests/Editor/ReflectionTests.cs new file mode 100644 index 0000000..ad6f316 --- /dev/null +++ b/Assets/Tests/Editor/ReflectionTests.cs @@ -0,0 +1,34 @@ +using System; +using System.Reflection; +using NUnit.Framework; +using UnityEditor; +using UnityEngine; + +namespace Coffee +{ + public class ReflectionTests + { + const BindingFlags flags = BindingFlags.Static | BindingFlags.NonPublic | BindingFlags.Public; + + [Test] + public void DoIntRangeProperty() + { + var method = typeof(MaterialEditor) + .GetMethod("DoIntRangeProperty", flags) + .CreateDelegate(typeof(Func), null) + as Func; + + Assert.IsNotNull(method); + } + + [Test] + public void DoPowerRangeProperty() + { + var method = typeof(MaterialEditor) + .GetMethod("DoPowerRangeProperty", flags) + .CreateDelegate(typeof(Func), null) + as Func; + Assert.IsNotNull(method); + } + } +} diff --git a/Assets/Tests/Editor/NewTestScript.cs.meta b/Assets/Tests/Editor/ReflectionTests.cs.meta similarity index 100% rename from Assets/Tests/Editor/NewTestScript.cs.meta rename to Assets/Tests/Editor/ReflectionTests.cs.meta