A game about forced loneliness, made by TACStudios
1using System; 2using NUnit.Framework; 3 4namespace UnityEngine.TestTools 5{ 6 /// <summary> 7 /// The <see cref="UnitySetUpAttribute"/> and `UnityTearDown` attributes are identical to the standard `SetUp` and `TearDown` attributes, with the exception that they allow for <see cref="IEditModeTestYieldInstruction"/>. The `UnitySetUp` and `UnityTearDown` attributes expect a return type of [IEnumerator](https://docs.microsoft.com/en-us/dotnet/api/system.collections.ienumerator?view=netframework-4.8). 8 /// <example> 9 /// <code> 10 ///public class SetUpTearDownExample 11 /// { 12 /// [UnitySetUp] 13 /// public IEnumerator SetUp() 14 /// { 15 /// yield return new EnterPlayMode(); 16 /// } 17 /// 18 /// [Test] 19 /// public void MyTest() 20 /// { 21 /// Debug.Log("This runs inside playmode"); 22 /// } 23 /// 24 /// [UnityTearDown] 25 /// public IEnumerator TearDown() 26 /// { 27 /// yield return new ExitPlayMode(); 28 /// } 29 /// } 30 /// </code> 31 /// </example> 32 /// </summary> 33 [AttributeUsage(AttributeTargets.Method)] 34 public class UnityTearDownAttribute : NUnitAttribute 35 { 36 } 37}