Version: 2018.1
public T component ;

Description

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!"); } } }