Пример #1
0
        private void StartNewTest()
        {
            m_TestMessages = "";
            m_Stacktrace   = "";
            m_TestState    = TestState.Running;

            m_StartTime = Time.time;
            currentTest = m_TestsProvider.GetNextTest() as TestComponent;

            var testResult = m_ResultList.Single(result => result.TestComponent == currentTest);

            if (currentTest != null && currentTest.IsExludedOnThisPlatform())
            {
                m_TestState = TestState.Ignored;
                Debug.Log(currentTest.gameObject.name + " is excluded on this platform");
            }

            // don't ignore test if user initiated it from the runner and it's the only test that is being run
            if (currentTest != null &&
                (currentTest.IsIgnored() &&
                 !(isInitializedByRunner && m_ResultList.Count == 1)))
            {
                m_TestState = TestState.Ignored;
            }

            if (currentTest != null && m_TestState != TestState.Ignored)
            {
                currentTest.EnableTest(true);
            }

            LogMessage(k_StartedMessage);
            TestRunnerCallback.TestStarted(testResult);
        }