Question by
henrymosley · Mar 07 at 10:59 AM ·
testing
Some troubles with Unity3d test scripts
Here's my test script:
using UnityEngine; using UnityEngine.TestTools; using NUnit.Framework; using System.Collections;
public class NewTestScript {
[Test]
public void TestAnotherStaticFunction()
{
int a = NewBehaviourScript.FunctionUnderTest(1);
int b = 1;
// Use the Assert class to test conditions.
Assert.IsTrue(a == b);
}
It works in edit mode but I've tried adding and removing the Super Test Name Space from the function under test and the invoking code and tried adding files from the .asmdef file. My earlier modular testing background was primarily in Visual Studio and I'm attempting to do my coomeet work based on past testing. Is there some crucially restricted feature in the editing regime trials, or am I forgetting anything?
using System.Collections; using System.Collections.Generic; using UnityEngine;
public class NewBehaviourScript : MonoBehaviour { ///
/// the stupidest function in the world, /// used to verify tests. /// public static int FunctionUnderTest(int a) { return a; } }
Comment