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()); } }
/// <summary> /// Return that tests were run, and all of them reported success /// </summary> public bool AllTestsPassed() { return(testResult.AllTestsPassed()); }