| using NUnit.Framework; | |
| using UnityEngine; | |
| public class TestBehaviourBase<T> where T : Behaviour | |
| { | |
| protected T m_TestObject; | |
| [] | |
| public virtual void TestSetup() | |
| { | |
| var gameObject = new GameObject(); | |
| m_TestObject = gameObject.AddComponent<T>(); | |
| } | |
| [] | |
| public virtual void Teardown() | |
| { | |
| GameObject.DestroyImmediate(m_TestObject.gameObject); | |
| } | |
| } | |