Beispiel #1
0
        //[TestCaseSource("FindSolutionFiles")]
        public void AnalyzeSolution(string testCaseLabel, string sln)
        {
            if (SlnFinder.ShouldIgnore(sln))
            {
                Assert.Ignore();
            }

            PrintFreeMemoryAndCheckConsumption();

            _currentSolution     = sln;
            _currentSolutionPath = SlnFinder.GetFullPath(_currentSolution);
            SlnFinder.Start(sln);

            Console.WriteLine("Opening solution: {0} ({1})\n", ExistingSolutionFilePath, DateTime.Now);
            Console.WriteLine("Log: {0}", _logName        = GetLogName(sln));
            Console.WriteLine("Contexts: {0}\n", _zipName = GetZipName(sln));
            Console.WriteLine("copy&paste: {0}\n", sln.Replace(@"\", "/"));

            _logger = new TestRunnerLogger(_logName);

            DoTestSolution(ExistingSolutionFilePath, RunAnalysis);

            if (_logger.HasError)
            {
                SlnFinder.Crash(sln);
                Assert.Fail("execution produced at least one error, see error log for details\n");
            }
            else
            {
                SlnFinder.End(sln);
            }
        }
        //[TestCaseSource("FindSolutionFiles")]
        public void AnalyzeSolution(string testCaseLabel, string sln)
        {
            PrintFreeMemoryAndCheckConsumption();

            if (_slnFinder.ShouldIgnore(sln))
            {
                Assert.Ignore();
            }

            _currentSolution     = sln;
            _currentSolutionPath = _slnFinder.GetFullPath(_currentSolution);
            _slnFinder.Start(sln);

            Console.WriteLine("Opening solution: {0} ({1})\n", ExistingSolutionFilePath, DateTime.Now);
            Console.WriteLine("Log: {0}", _logName = GetLogName(sln));
            Console.WriteLine("copy&paste: {0}\n", sln.Replace(@"\", "/"));

            _logger = new TestRunnerLogger(_logName);

            _existingAssemblies = Sets.NewHashSet <IAssemblyName>();
            _writingArchives    = new Dictionary <IAssemblyName, WritingArchive>();

            DoTestSolution(ExistingSolutionFilePath, RunAnalysis);

            if (_logger.HasError)
            {
                _slnFinder.Crash(sln);
                Assert.Fail("execution produced at least one error, see error log for details\n");
            }
            else
            {
                _slnFinder.End(sln);
            }
        }
        public void CanBuildFullPath()
        {
            const string sln      = "a\\b.sln";
            var          actual   = _sut.GetFullPath(sln);
            var          expected = PathOf(sln);

            Assert.AreEqual(expected, actual);
        }