Rasagar/Library/PackageCache/com.unity.ugui/Tests/Editor/UGUI/TestBehaviourBase.cs
2024-08-26 23:07:20 +03:00

21 lines
413 B
C#

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