Unity checks that you have a folder named Editor selected in the Project window, and then creates a NewTestScript C# script class for you containing the following:
using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
namespace Tests {
public class NewTestScript {
// A Test behaves as an ordinary method
[Test]
public void NewTestScript1SimplePasses() {
// Use the Assert class to test conditions
}
// A UnityTest behaves like a coroutine in Play Mode. In Edit Mode you can use
// `yield return null;` to skip a frame.
[UnityTest]
public IEnumerator NewTestScriptWithEnumeratorPasses() {
// Use the Assert class to test conditions.
// Use yield to skip a frame.
yield return null;
}
}
}
In the Test Runner window, you should see the script class and its two methods listed. Note...