예제 #1
0
        /// <summary>
        ///    Извлечение сущности тестового запуска
        /// </summary>
        /// <param name="existingTestRun">Абсолютный путь к директории тестового запуска</param>
        /// <returns>Cущность тестового запуска</returns>
        public static TestRunEntity ObtainTestRunEntity(string existingTestRun)
        {
            var      fileName = Path.GetFileName(existingTestRun);
            string   machineName;
            DateTime testingDateTime;

            AnalyzerUtilities.ExtractLaunchPartyComponents(fileName, out machineName, out testingDateTime);
            var runEntity = new TestRunEntity
            {
                TestRunDirectory = existingTestRun,
                MachineName      = machineName,
                RunningDateTime  = testingDateTime
            };

            return(runEntity);
        }
예제 #2
0
        /// <summary>
        ///    Обновление модели для тестового запуска
        /// </summary>
        /// <param name="testingRunFolder">Директория тестового запуска</param>
        /// <returns>Актуальная версия модели тестового запуска</returns>
        public static IEnumerable <SolutionInfoViewModel> RefreshTestingRunModel(string testingRunFolder)
        {
            var      testingRunModel   = RetrieveSlnInfoViewModels();
            var      testRunFolderName = Path.GetFileName(testingRunFolder);
            string   machineName;
            DateTime testingDateTime;

            AnalyzerUtilities.ExtractLaunchPartyComponents(testRunFolderName, out machineName, out testingDateTime);
            var runEntity = new TestRunEntity
            {
                TestRunDirectory = testingRunFolder,
                MachineName      = machineName,
                RunningDateTime  = testingDateTime
            };

            RestoreTestRunState(Tuple.Create(runEntity, testingRunModel));

            return(testingRunModel);
        }