I am trying to use the testing framework for the first time. I am using Unity 2019.3.0a6.
I have created a Test folder by right clicking my asset folder and choosing Create → Testing → Tests Assembly Folder. Inside the folder I have created a test by right clicking and choosing Create → Testing → Test Script. I open the test and want to create an instance of the class I want to test like this. (The created assembly folder has default Import Settings).
using System.Collections;
using System.Collections.Generic;
using NUnit.Framework;
using UnityEngine;
using UnityEngine.TestTools;
namespace Tests
{
public class TestActionSequence
{
// A Test behaves as an ordinary method
[Test]
public void TestActionSequenceSimplePasses()
{
// 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 TestActionSequenceWithEnumeratorPasses()
{
[B]var objectToTest = new GameObject().AddComponent<ActionSequence>(); //error CS0246: The type or namespace name 'ActionSequence' could not be found (are you missing a using directive or an assembly reference?)[/B]
// Use the Assert class to test conditions.
// Use yield to skip a frame.
yield return null;
}
}
}
As fare as I can tell there is no reference to the “Assembly-CSharp” where all my classes are. There is the option to add a Assembly reference from the .asmdef file but my project assembly is not listed in the list. What am i missing here?