Пример #1
0
        public static void OutlineFile(IEditorShell editorShell, EditorTestFilesFixture fixture, string name) {
            string testFile = fixture.GetDestinationPath(name);
            string baselineFile = testFile + ".outline";
            string text = fixture.LoadDestinationFile(name);

            OutlineRegionCollection rc = BuildOutlineRegions(editorShell, text);
            string actual = TextRangeCollectionWriter.WriteCollection(rc);

            if (_regenerateBaselineFiles) {
                baselineFile = Path.Combine(fixture.SourcePath, Path.GetFileName(testFile)) + ".outline";
                TestFiles.UpdateBaseline(baselineFile, actual);
            } else {
                TestFiles.CompareToBaseLine(baselineFile, actual);
            }
        }
Пример #2
0
        public static void OutlineFile(IServiceContainer services, EditorTestFilesFixture fixture, string name)
        {
            var testFile     = fixture.GetDestinationPath(name);
            var baselineFile = testFile + ".outline";
            var text         = fixture.LoadDestinationFile(name);

            var rc     = BuildOutlineRegions(services, text);
            var actual = TextRangeCollectionWriter.WriteCollection(rc);

            if (_regenerateBaselineFiles)
            {
                baselineFile = Path.Combine(fixture.SourcePath, Path.GetFileName(testFile)) + ".outline";
                TestFiles.UpdateBaseline(baselineFile, actual);
            }
            else
            {
                TestFiles.CompareToBaseLine(baselineFile, actual);
            }
        }
Пример #3
0
        public static void OutlineFile(IEditorShell editorShell, EditorTestFilesFixture fixture, string name)
        {
            string testFile     = fixture.GetDestinationPath(name);
            string baselineFile = testFile + ".outline";
            string text         = fixture.LoadDestinationFile(name);

            OutlineRegionCollection rc = BuildOutlineRegions(editorShell, text);
            string actual = TextRangeCollectionWriter.WriteCollection(rc);

            if (_regenerateBaselineFiles)
            {
                baselineFile = Path.Combine(fixture.SourcePath, Path.GetFileName(testFile)) + ".outline";
                TestFiles.UpdateBaseline(baselineFile, actual);
            }
            else
            {
                TestFiles.CompareToBaseLine(baselineFile, actual);
            }
        }
Пример #4
0
        public static void OutlineFile(EditorTestFilesFixture fixture, string name)
        {
            string testFile     = fixture.GetDestinationPath(name);
            string baselineFile = testFile + ".outline";
            string text         = fixture.LoadDestinationFile(name);

            OutlineRegionCollection rc = BuildOutlineRegions(text);
            string actual = TextRangeCollectionWriter.WriteCollection(rc);

            if (_regenerateBaselineFiles)
            {
                // Update this to your actual enlistment if you need to update baseline
                string enlistmentPath = @"F:\RTVS\src\R\Editor\Test\Files";
                baselineFile = Path.Combine(enlistmentPath, Path.GetFileName(testFile)) + ".outline";

                TestFiles.UpdateBaseline(baselineFile, actual);
            }
            else
            {
                TestFiles.CompareToBaseLine(baselineFile, actual);
            }
        }
Пример #5
0
        public static void OutlineFile(EditorTestFilesFixture fixture, string name)
        {
            string testFile = fixture.GetDestinationPath(name);
            string baselineFile = testFile + ".outline";
            string text = fixture.LoadDestinationFile(name);

            OutlineRegionCollection rc = BuildOutlineRegions(text);
            string actual = TextRangeCollectionWriter.WriteCollection(rc);

            if (_regenerateBaselineFiles)
            {
                // Update this to your actual enlistment if you need to update baseline
                string enlistmentPath = @"F:\RTVS\src\R\Editor\Test\Files";
                baselineFile = Path.Combine(enlistmentPath, Path.GetFileName(testFile)) + ".outline";

                TestFiles.UpdateBaseline(baselineFile, actual);
            }
            else
            {
                TestFiles.CompareToBaseLine(baselineFile, actual);
            }
        }