Example #1
0
        protected VimTestBase()
        {
            _vim = CompositionContainer.GetExportedValue <IVim>();
            _vimBufferFactory        = CompositionContainer.GetExportedValue <IVimBufferFactory>();
            _vimErrorDetector        = CompositionContainer.GetExportedValue <IVimErrorDetector>();
            _commonOperationsFactory = CompositionContainer.GetExportedValue <ICommonOperationsFactory>();
            _wordUtilFactory         = CompositionContainer.GetExportedValue <IWordUtilFactory>();
            _bufferTrackingService   = CompositionContainer.GetExportedValue <IBufferTrackingService>();
            _foldManagerFactory      = CompositionContainer.GetExportedValue <IFoldManagerFactory>();
            _bulkOperations          = CompositionContainer.GetExportedValue <IBulkOperations>();
            _clipboardDevice         = CompositionContainer.GetExportedValue <IClipboardDevice>();
            _keyUtil = CompositionContainer.GetExportedValue <IKeyUtil>();

            _clipboardDevice.Text = String.Empty;

            // One setting we do differ on for a default is 'timeout'.  We don't want them interferring
            // with the reliability of tests.  The default is on but turn it off here to prevent any
            // problems
            _vim.GlobalSettings.Timeout = false;

            // Don't let the personal VimRc of the user interfere with the unit tests
            _vim.AutoLoadVimRc = false;

            // Don't show trace information in the unit tests.  It really clutters the output in an
            // xUnit run
            VimTrace.TraceSwitch.Level = TraceLevel.Off;
        }
Example #2
0
        protected VimTestBase()
        {
            _vim = CompositionContainer.GetExportedValue<IVim>();
            _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>();
            _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>();
            _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>();
            _wordUtilFactory = CompositionContainer.GetExportedValue<IWordUtilFactory>();
            _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>();
            _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>();
            _bulkOperations = CompositionContainer.GetExportedValue<IBulkOperations>();
            _clipboardDevice = CompositionContainer.GetExportedValue<IClipboardDevice>();
            _keyUtil = CompositionContainer.GetExportedValue<IKeyUtil>();

            _clipboardDevice.Text = String.Empty;

            // One setting we do differ on for a default is 'timeout'.  We don't want them interferring
            // with the reliability of tests.  The default is on but turn it off here to prevent any
            // problems
            _vim.GlobalSettings.Timeout = false;

            // Don't let the personal VimRc of the user interfere with the unit tests
            _vim.AutoLoadVimRc = false;

            // Don't show trace information in the unit tests.  It really clutters the output in an
            // xUnit run
            VimTrace.TraceSwitch.Level = TraceLevel.Off;
        }
Example #3
0
 public void Create(params string[] lines)
 {
     var textView = CreateTextView(lines);
     _textBuffer = textView.TextBuffer;
     _bufferTrackingService = new BufferTrackingService();
     _jumpListRaw = new JumpList(textView, _bufferTrackingService);
     _jumpList = _jumpListRaw;
 }
Example #4
0
        public void Create(params string[] lines)
        {
            var textView = CreateTextView(lines);

            _textBuffer            = textView.TextBuffer;
            _bufferTrackingService = new BufferTrackingService();
            _jumpListRaw           = new JumpList(textView, _bufferTrackingService);
            _jumpList = _jumpListRaw;
        }
Example #5
0
 protected VimTestBase()
 {
     _vim = CompositionContainer.GetExportedValue<IVim>();
     _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>();
     _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>();
     _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>();
     _wordUtilFactory = CompositionContainer.GetExportedValue<IWordUtilFactory>();
     _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>();
     _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>();
     _bulkOperations = CompositionContainer.GetExportedValue<IBulkOperations>();
     _clipboardDevice = CompositionContainer.GetExportedValue<IClipboardDevice>();
     _protectedOperations = new ProtectedOperations(_vimErrorDetector);
 }
Example #6
0
 public void SetupBase()
 {
     _compositionContainer = GetOrCreateCompositionContainer();
     _vim = _compositionContainer.GetExportedValue <IVim>();
     _vimBufferFactory               = _compositionContainer.GetExportedValue <IVimBufferFactory>();
     _textBufferFactoryService       = _compositionContainer.GetExportedValue <ITextBufferFactoryService>();
     _textEditorFactoryService       = _compositionContainer.GetExportedValue <ITextEditorFactoryService>();
     _vimErrorDetector               = _compositionContainer.GetExportedValue <IVimErrorDetector>();
     _commonOperationsFactory        = _compositionContainer.GetExportedValue <ICommonOperationsFactory>();
     _wordUtilFactory                = _compositionContainer.GetExportedValue <IWordUtilFactory>();
     _bufferTrackingService          = _compositionContainer.GetExportedValue <IBufferTrackingService>();
     _foldManagerFactory             = _compositionContainer.GetExportedValue <IFoldManagerFactory>();
     _smartIndentationService        = _compositionContainer.GetExportedValue <ISmartIndentationService>();
     _editorOperationsFactoryService = _compositionContainer.GetExportedValue <IEditorOperationsFactoryService>();
     _vimErrorDetector.Clear();
     _protectedOperations = new ProtectedOperations(_vimErrorDetector);
 }
Example #7
0
        public VimEditorHost(CompositionContainer compositionContainer)
            : base(compositionContainer)
        {
            _vim = CompositionContainer.GetExportedValue<IVim>();
            _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>();
            _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>();
            _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>();
            _wordUtil = CompositionContainer.GetExportedValue<IWordUtil>();
            _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>();
            _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>();
            _bulkOperations = CompositionContainer.GetExportedValue<IBulkOperations>();
            _keyUtil = CompositionContainer.GetExportedValue<IKeyUtil>();
            _vimProtectedOperations = CompositionContainer.GetExportedValue<IVimProtectedOperations>();

            _keyboardDevice = CompositionContainer.GetExportedValue<IKeyboardDevice>();
            _mouseDevice = CompositionContainer.GetExportedValue<IMouseDevice>();
            _clipboardDevice = CompositionContainer.GetExportedValue<IClipboardDevice>();
        }
Example #8
0
        public VimEditorHost(CompositionContainer compositionContainer) : base(compositionContainer)
        {
            _vim = CompositionContainer.GetExportedValue <IVim>();
            _vimBufferFactory        = CompositionContainer.GetExportedValue <IVimBufferFactory>();
            _vimErrorDetector        = CompositionContainer.GetExportedValue <IVimErrorDetector>();
            _commonOperationsFactory = CompositionContainer.GetExportedValue <ICommonOperationsFactory>();
            _bufferTrackingService   = CompositionContainer.GetExportedValue <IBufferTrackingService>();
            _foldManagerFactory      = CompositionContainer.GetExportedValue <IFoldManagerFactory>();
            _bulkOperations          = CompositionContainer.GetExportedValue <IBulkOperations>();
            _keyUtil             = CompositionContainer.GetExportedValue <IKeyUtil>();
            _protectedOperations = CompositionContainer.GetExportedValue <IProtectedOperations>();

            _keyboardDevice                 = CompositionContainer.GetExportedValue <IKeyboardDevice>();
            _mouseDevice                    = CompositionContainer.GetExportedValue <IMouseDevice>();
            _clipboardDevice                = CompositionContainer.GetExportedValue <IClipboardDevice>();
            _editorFormatMapService         = CompositionContainer.GetExportedValue <IEditorFormatMapService>();
            _classificationFormatMapService = CompositionContainer.GetExportedValue <IClassificationFormatMapService>();
        }
Example #9
0
        protected VimTestBase()
        {
            // Parts of the core editor in Vs2012 depend on there being an Application.Current value else
            // they will throw a NullReferenceException.  Create one here to ensure the unit tests successfully
            // pass
            if (Application.Current == null)
            {
                new Application();
            }

            _vim = CompositionContainer.GetExportedValue<IVim>();
            _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>();
            _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>();
            _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>();
            _wordUtil = CompositionContainer.GetExportedValue<IWordUtil>();
            _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>();
            _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>();
            _bulkOperations = CompositionContainer.GetExportedValue<IBulkOperations>();
            _keyUtil = CompositionContainer.GetExportedValue<IKeyUtil>();
            _vimProtectedOperations = CompositionContainer.GetExportedValue<IVimProtectedOperations>();

            _keyboardDevice = CompositionContainer.GetExportedValue<IKeyboardDevice>();
            _mouseDevice = CompositionContainer.GetExportedValue<IMouseDevice>();
            _clipboardDevice = CompositionContainer.GetExportedValue<IClipboardDevice>();
            _clipboardDevice.Text = String.Empty;

            // One setting we do differ on for a default is 'timeout'.  We don't want them interfering
            // with the reliability of tests.  The default is on but turn it off here to prevent any
            // problems
            _vim.GlobalSettings.Timeout = false;

            // Don't let the personal VimRc of the user interfere with the unit tests
            _vim.AutoLoadVimRc = false;

            // Don't show trace information in the unit tests.  It really clutters the output in an
            // xUnit run
            VimTrace.TraceSwitch.Level = TraceLevel.Off;
        }
Example #10
0
        protected VimTestBase()
        {
            // Parts of the core editor in Vs2012 depend on there being an Application.Current value else
            // they will throw a NullReferenceException.  Create one here to ensure the unit tests successfully
            // pass
            if (Application.Current == null)
            {
                new Application();
            }

            _vim = CompositionContainer.GetExportedValue <IVim>();
            _vimBufferFactory        = CompositionContainer.GetExportedValue <IVimBufferFactory>();
            _vimErrorDetector        = CompositionContainer.GetExportedValue <IVimErrorDetector>();
            _commonOperationsFactory = CompositionContainer.GetExportedValue <ICommonOperationsFactory>();
            _wordUtilFactory         = CompositionContainer.GetExportedValue <IWordUtilFactory>();
            _bufferTrackingService   = CompositionContainer.GetExportedValue <IBufferTrackingService>();
            _foldManagerFactory      = CompositionContainer.GetExportedValue <IFoldManagerFactory>();
            _bulkOperations          = CompositionContainer.GetExportedValue <IBulkOperations>();
            _keyUtil = CompositionContainer.GetExportedValue <IKeyUtil>();
            _vimProtectedOperations = CompositionContainer.GetExportedValue <IVimProtectedOperations>();

            _keyboardDevice       = CompositionContainer.GetExportedValue <IKeyboardDevice>();
            _mouseDevice          = CompositionContainer.GetExportedValue <IMouseDevice>();
            _clipboardDevice      = CompositionContainer.GetExportedValue <IClipboardDevice>();
            _clipboardDevice.Text = String.Empty;

            // One setting we do differ on for a default is 'timeout'.  We don't want them interfering
            // with the reliability of tests.  The default is on but turn it off here to prevent any
            // problems
            _vim.GlobalSettings.Timeout = false;

            // Don't let the personal VimRc of the user interfere with the unit tests
            _vim.AutoLoadVimRc = false;

            // Don't show trace information in the unit tests.  It really clutters the output in an
            // xUnit run
            VimTrace.TraceSwitch.Level = TraceLevel.Off;
        }
Example #11
0
 public override void SetupBase()
 {
     base.SetupBase();
     _vim = CompositionContainer.GetExportedValue<IVim>();
     _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>();
     _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>();
     _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>();
     _wordUtilFactory = CompositionContainer.GetExportedValue<IWordUtilFactory>();
     _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>();
     _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>();
     _vimErrorDetector.Clear();
     _protectedOperations = new ProtectedOperations(_vimErrorDetector);
 }
Example #12
0
        public override void SetupBase()
        {
            base.SetupBase();
            _vim = CompositionContainer.GetExportedValue<IVim>();
            _vimBufferFactory = CompositionContainer.GetExportedValue<IVimBufferFactory>();
            _vimErrorDetector = CompositionContainer.GetExportedValue<IVimErrorDetector>();
            _commonOperationsFactory = CompositionContainer.GetExportedValue<ICommonOperationsFactory>();
            _wordUtilFactory = CompositionContainer.GetExportedValue<IWordUtilFactory>();
            _bufferTrackingService = CompositionContainer.GetExportedValue<IBufferTrackingService>();
            _foldManagerFactory = CompositionContainer.GetExportedValue<IFoldManagerFactory>();
            _vimErrorDetector.Clear();
            _protectedOperations = new ProtectedOperations(_vimErrorDetector);

            // One setting we do differ on for a default is 'timeout'.  We don't want them interferring
            // with the reliability of tests.  The default is on but turn it off here to prevent any
            // problems
            _vim.GlobalSettings.Timeout = false;

            // Don't let the personal VimRc of the user interfere with the unit tests
            _vim.AutoLoadVimRc = false;

            _vim.VimData.LastShellCommand = FSharpOption<string>.None;
            _vim.VimData.LastCommand = FSharpOption<StoredCommand>.None;
        }
 public void SetUp()
 {
     _bufferTrackingServiceRaw = new BufferTrackingService();
     _bufferTrackingService = _bufferTrackingServiceRaw;
 }
Example #14
0
 internal VimErrorDetector(IVim vim, IBufferTrackingService bufferTrackingService, ITextBufferUndoManagerProvider textBufferUndoManagerProvider)
 {
     _vim = vim;
     _textBufferUndoManagerProvider = textBufferUndoManagerProvider;
     _bufferTrackingService = bufferTrackingService;
 }
Example #15
0
 internal VimErrorDetector(IVim vim, IBufferTrackingService bufferTrackingService, ITextBufferUndoManagerProvider textBufferUndoManagerProvider)
 {
     _vim = vim;
     _textBufferUndoManagerProvider = textBufferUndoManagerProvider;
     _bufferTrackingService         = bufferTrackingService;
 }
Example #16
0
 public void SetupBase()
 {
     _compositionContainer = GetOrCreateCompositionContainer();
     _vim = _compositionContainer.GetExportedValue<IVim>();
     _vimBufferFactory = _compositionContainer.GetExportedValue<IVimBufferFactory>();
     _textBufferFactoryService = _compositionContainer.GetExportedValue<ITextBufferFactoryService>();
     _textEditorFactoryService = _compositionContainer.GetExportedValue<ITextEditorFactoryService>();
     _vimErrorDetector = _compositionContainer.GetExportedValue<IVimErrorDetector>();
     _commonOperationsFactory = _compositionContainer.GetExportedValue<ICommonOperationsFactory>();
     _wordUtilFactory = _compositionContainer.GetExportedValue<IWordUtilFactory>();
     _bufferTrackingService = _compositionContainer.GetExportedValue<IBufferTrackingService>();
     _foldManagerFactory = _compositionContainer.GetExportedValue<IFoldManagerFactory>();
     _smartIndentationService = _compositionContainer.GetExportedValue<ISmartIndentationService>();
     _vimErrorDetector.Clear();
     _protectedOperations = new ProtectedOperations(_vimErrorDetector);
 }
Example #17
0
 public BufferTrackingServiceTest()
 {
     _bufferTrackingServiceRaw = new BufferTrackingService();
     _bufferTrackingService = _bufferTrackingServiceRaw;
 }
 public BufferTrackingServiceTest()
 {
     _bufferTrackingServiceRaw = new BufferTrackingService();
     _bufferTrackingService    = _bufferTrackingServiceRaw;
 }
Example #19
0
 public void SetUp()
 {
     _bufferTrackingServiceRaw = new BufferTrackingService();
     _bufferTrackingService    = _bufferTrackingServiceRaw;
 }