Пример #1
0
        public void CodeCoverageHighlighterRemoveMarkersDoesNotThrowInvalidCastExceptionWhenOneMarkerTagIsTask()
        {
            ITextMarker textMarker = markerService.Create(0, 2);

            textMarker.Tag = new Task(null, String.Empty, 1, 1, TaskType.Error);

            CodeCoverageHighlighter highlighter = new CodeCoverageHighlighter();

            Assert.DoesNotThrow(delegate { highlighter.RemoveMarkers(document); });
        }
        public void RemoveCodeCoverageMarkers()
        {
            // Check that code coverage markers exist.
            Assert.IsTrue(ContainsCodeCoverageMarkers(markerStrategy));

            // Remove code coverage markers.
            CodeCoverageHighlighter highlighter = new CodeCoverageHighlighter();

            highlighter.RemoveMarkers(document);

            // Check that code coverage markers have been removed.
            Assert.IsFalse(ContainsCodeCoverageMarkers(markerStrategy));

            // Check that non-code coverage markers still exist.
            Assert.IsTrue(ContainsNonCodeCoverageMarkers(markerStrategy));
        }