title: Test classes do not see the classes under test when unit testing for Unity3D
body: <p>I am trying to write unit tests in C# for the scripts that need to run inside Unity3D, later. My C# scripts are in the folder "Assets/Scripts" of the Unity project.</p>
  
  <p>I am using <strong>Unity version 2019.1.0f2</strong> with <strong>Visual Studio Community for Mac V8.0.5 (build 9)</strong>, under <strong>Mac OS X version 10.14.4</strong>.</p>
  
  <p>Unity has a test runner window that I used: <code>Window &gt; General &gt; Test runner</code>. Inside that test runner window, I clicked on "Play mode" and on "Create Playmode Test Assembly Folder". Unity created a folder called "Tests" for me in which I am supposed to put my tests. So far, so good.</p>
  
  <p>Now here is the problem:</p>
  
  <p><strong>My test code cannot see the classes under test that are in the parent folder of that test folder!</strong></p>
  
  <p>This is the folder hierarchy:</p>
  
  <pre><code>  Assets
      Scripts
        MyFirstScript.cs
        Tests
          MyTestScript.cs
          Tests.asmdef
  </code></pre>
  
  <p>When I double-click on MyTestScript.cs, Visual Studio opens the solution and the source file OK. Now, I am trying to write</p>
  
  <pre><code>    var x = new MyFirstScript();
  </code></pre>
  
  <p>and the compiler complains "The type or namespace name 'MyFirstScript' could not be found".</p>
  
  <p>It seems as if the classes in the Scripts folder are completely unknown inside the classes that are in the Tests folder.</p>
  
  <p>This is MyFirstScript.cs:</p>
  
  <pre class="lang-cs prettyprint-override"><code>using UnityEngine;
  
  public class MyFirstScript : MonoBehaviour
  {
      // Start is called before the first frame update
      void Start()
      {
  
      }
  
      // Update is called once per frame
      void Update()
      {
  
      }
  }
  </code></pre>
  
  <p>And this is MyTestScript.cs:</p>
  
  <pre class="lang-cs prettyprint-override"><code>using System.Collections;
  using System.Collections.Generic;
  using NUnit.Framework;
  using UnityEngine;
  using UnityEngine.TestTools;
  
  namespace Tests
  {
      public class MyTestScript
      {
          // A Test behaves as an ordinary method
          [Test]
          public void MyTestScriptSimplePasses()
          {
              var x = new MyFirstScript(); // problem occurs HERE!
  
              // 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 MyTestScriptWithEnumeratorPasses()
          {
              // Use the Assert class to test conditions.
              // Use yield to skip a frame.
              yield return null;
          }
      }
  }
  </code></pre>
  
  <p>I expected that I could use the class MyFirstScript in my test code (MyTestScript). What can I do?</p>