public void Update()
 {
     if (suite.RunOneTest())
     {
         UUnitTestResult result = suite.GetResults();
         Debug.Log(result.Summary());
         GameObject.Destroy(gameObject);
     }
 }
Пример #2
0
        public static void TestImmediately()
        {
            ClearDebugLog();
            UUnitTestSuite suite = new UUnitTestSuite();

            suite.FindAndAddAllTestCases(typeof(UUnitTestCase));
            suite.RunAllTests();
            UUnitTestResult result = suite.GetResults();

            if (!result.AllTestsPassed())
            {
                Debug.LogWarning(result.Summary());
                throw new Exception("Not all tests passed.");
            }
            else
            {
                Debug.Log(result.Summary());
            }
        }