The test component attached this object.
using UnityEngine; using UnityEngine.TestTools; using NUnit.Framework; using System.Collections;
public class NewPlayModeTest { [UnityTest] public IEnumerator NewPlayModeTestWithEnumeratorPasses() { var test = new MonoBehaviourTest<MonoBehaviourTestable>(); yield return test;
MonoBehaviour.Destroy(test.gameObject); }
public class MonoBehaviourTestable : MonoBehaviour, IMonoBehaviourTest { public bool IsTestFinished { get; private set; }
public void Start() { IsTestFinished = true; }
public void SayHello() { Debug.Log("Hello world!"); } } }
Did you find this page useful? Please give it a rating: