private void RunVerification()

in RuleTests/BaselinedRuleTest.cs [141:168]


        private void RunVerification(CodeAnalysisResult result, string resultsString)
        {
            // Check if the resultsString matches our baseline. If not, output the test files that
            // were loaded, and some commands to easily overwrite the existing baseline with the output.
            // once you've overwritten it you can compare the new and old baselines using the Diff tools
            // in Team Explorer
            string baseline = RuleTestUtils.ReadFileToString(BaselineFilePath);
            RuleTestUtils.SaveStringToFile(resultsString, OutputFilePath);

            string loadedTestScriptFiles = ListScriptFilenames();

            if (string.Compare(resultsString, baseline, false, CultureInfo.CurrentCulture) != 0)
            {
                Assert.Fail(String.Format(
                    "The result is not the same as expected. It's recommended you compare the actual output " +
                    "to the baseline. If the output matches your expectations, update the baseline file inside " +
                    "the project.\r\n\r\n" +
                    "################## loaded test script files ################## \r\n" +
                    loadedTestScriptFiles + "\r\n" +
                    "rem ################## View Baseline: ##################\r\n" +
                    "Notepad \"{0}\" \r\n\r\n" +
                    "rem ################## View Actual Output: ##################\r\n" +
                    "Notepad \"{1}\" \r\n\r\n" +
                    "################## cd test folder command ##################\r\n" +
                    "cd \"{2}\"\r\n",
                    BaselineFilePath, OutputFilePath, ScriptsFolder));
            }
        }