public IEnumerator <ITestAdaptor> GetTestListAsync(TestPlatform platform)
        {
            var testFromCache = m_TestListCache.GetTestFromCacheAsync(platform);

            while (testFromCache.MoveNext())
            {
                yield return(null);
            }


            if (testFromCache.Current != null)
            {
                yield return(testFromCache.Current);
            }
            else
            {
                var test = m_InnerTestListProvider.GetTestListAsync(platform);
                while (test.MoveNext())
                {
                    yield return(null);
                }

                test.Current.ParseForNameDuplicates();
                m_TestListCache.CacheTest(platform, test.Current);
                AnalyticsReporter.AnalyzeTestTreeAndReport(test.Current);
                yield return(m_TestAdaptorFactory.Create(test.Current));
            }
        }
Exemplo n.º 2
0
        public void RunStarted(ITest testsToRun)
        {
            m_AdaptorFactory.ClearResultsCache();
            var testRunnerTestsToRun = m_AdaptorFactory.Create(testsToRun);

            TryInvokeAllCallbacks(callbacks => callbacks.RunStarted(testRunnerTestsToRun));
        }
Exemplo n.º 3
0
        public IEnumerator <ITestAdaptor> GetTestFromCacheAsync(TestPlatform platform)
        {
            var index = m_TestListCacheData.platforms.IndexOf(platform);

            if (index < 0)
            {
                yield return(null);

                yield break;
            }

            var testData = m_TestListCacheData.cachedData[index];

            yield return(m_TestAdaptorFactory.Create(testData));
        }