Class MonoBehaviourTest<T>
This is a wrapper that allows running tests on MonoBehaviour scripts. Inherits from CustomYieldInstruction MonoBehaviourTest
is a coroutine and a helper for writing MonoBehaviour tests.
Yield a MonoBehaviourTest
when using the UnityTest
attribute to instantiate the MonoBehaviour
you wish to test and wait for it to finish running. Implement the IMonoBehaviourTest
interface on the MonoBehaviour
to state when the test completes.
구현
상속된 멤버
네임스페이스: UnityEngine.TestTools
어셈블리: solution.dll
구문
public class MonoBehaviourTest<T> : CustomYieldInstruction, IEnumerator where T : MonoBehaviour, IMonoBehaviourTest
타입 파라미터
이름 | 설명 |
---|---|
T | A MonoBehaviour component created for the test and attached to the tests GameObject. |
생성자
이름 | 설명 |
---|---|
MonoBehaviourTest(bool) | Initializes and returns an instance of MonoBehaviourTest. |
프로퍼티
이름 | 설명 |
---|---|
component | A MonoBehaviour component created for the test and attached to the test's GameObject. |
gameObject | A |
keepWaiting | (Inherited) Returns `true`` if the test is not finished yet, which keeps the coroutine suspended |