public void Init()
		{
			ServiceContainer container = new ServiceContainer();
			markerService = new MockTextMarkerService();
			container.AddService(typeof(ITextMarkerService), markerService);
			
			// Add xpath marker to document.
			AvalonEditDocumentAdapter doc = new AvalonEditDocumentAdapter(new ICSharpCode.AvalonEdit.Document.TextDocument(), container);
			doc.Text = "<Test/>";
			XPathNodeTextMarker xpathNodeMarker = new XPathNodeTextMarker(doc);
			XPathNodeMatch nodeMatch = new XPathNodeMatch("Test", "<Test/>", 0, 1, XPathNodeType.Element);
			xpathNodeMarker.AddMarker(nodeMatch);
			
			// Add non text editor provider view to workbench.
			workbench = new MockWorkbench();
			
			nonTextEditorProviderView = new MockViewContent();
			workbench.ViewContentCollection.Add(nonTextEditorProviderView);

			// Add document to view content.
			textEditorView = new MockTextEditorProviderViewContent();
			textEditorView.MockTextEditor.SetDocument(doc);
			workbench.ViewContentCollection.Add(textEditorView);
			
			command = new RemoveXPathHighlightingCommand(workbench);
		}
        public void Init()
        {
            IDocument doc = MockTextMarkerService.CreateDocumentWithMockService();
            markerService = doc.GetRequiredService<ITextMarkerService>();

            // Add xpath marker to document.
            doc.Text = "<Test/>";
            XPathNodeTextMarker xpathNodeMarker = new XPathNodeTextMarker(doc);
            XPathNodeMatch nodeMatch = new XPathNodeMatch("Test", "<Test/>", 0, 1, XPathNodeType.Element);
            xpathNodeMarker.AddMarker(nodeMatch);

            // Add non text editor provider view to workbench.
            workbench = MockRepository.GenerateStrictMock<IWorkbench>();
            workbench.Stub(w => w.ViewContentCollection).Return(new List<IViewContent>());

            nonTextEditorProviderView = new MockViewContent();
            workbench.ViewContentCollection.Add(nonTextEditorProviderView);

            // Add document to view content.
            textEditorView = new MockTextEditorProviderViewContent();
            textEditorView.MockTextEditor.SetDocument(doc);
            workbench.ViewContentCollection.Add(textEditorView);

            command = new RemoveXPathHighlightingCommand(workbench);
        }