Exemplo n.º 1
0
 public void SetUp()
 {
     _factory       = new MockRepository(MockBehavior.Loose);
     _textView      = _factory.Create <ITextView>(MockBehavior.Strict);
     _settings      = _factory.Create <IVimGlobalSettings>(MockBehavior.Loose);
     _localSettings = MockObjectFactory.CreateLocalSettings(global: _settings.Object, factory: _factory);
     _buffer        = _factory.Create <IVimBuffer>(MockBehavior.Strict);
     _buffer.SetupGet(x => x.ModeKind).Returns(ModeKind.Command);
     _buffer.SetupGet(x => x.TextView).Returns(_textView.Object);
     _buffer.SetupGet(x => x.Settings).Returns(_localSettings.Object);
     _caret = _factory.Create <IBlockCaret>(MockBehavior.Strict);
     _caret.SetupSet(x => x.CaretDisplay = CaretDisplay.Invisible);
     _caret.SetupSet(x => x.CaretOpacity = It.IsAny <double>());
     _controller = new BlockCaretController(_buffer.Object, _caret.Object);
 }
Exemplo n.º 2
0
 public void SetUp()
 {
     _view = new Mock<ITextView>();
     _buffer = new Mock<IVimBuffer>();
     _buffer.SetupGet(x => x.ModeKind).Returns(ModeKind.Command);
     _buffer.SetupGet(x => x.TextView).Returns(_view.Object);
     _caret = new Mock<IBlockCaret>(MockBehavior.Strict);
     _caret.SetupSet(x => x.CaretDisplay = CaretDisplay.Invisible);
     _controller = new BlockCaretController(_buffer.Object, _caret.Object);
 }
Exemplo n.º 3
0
 public void SetUp()
 {
     _view = new Mock<ITextView>();
     _settings = new MockVimGlobalSettings();
     _localSettings = new MockVimLocalSettings() { GlobalSettingsImpl = _settings };
     _buffer = new Mock<IVimBuffer>();
     _buffer.SetupGet(x => x.ModeKind).Returns(ModeKind.Command);
     _buffer.SetupGet(x => x.TextView).Returns(_view.Object);
     _buffer.SetupGet(x => x.Settings).Returns(_localSettings);
     _caret = new Mock<IBlockCaret>(MockBehavior.Strict);
     _caret.SetupSet(x => x.CaretDisplay = CaretDisplay.Invisible);
     _caret.SetupSet(x => x.CaretOpacity = _settings.CaretOpacity);
     _controller = new BlockCaretController(_buffer.Object, _caret.Object);
 }
Exemplo n.º 4
0
 public void SetUp()
 {
     _factory = new MockRepository(MockBehavior.Loose);
     _textView = _factory.Create<ITextView>(MockBehavior.Strict);
     _settings = _factory.Create<IVimGlobalSettings>(MockBehavior.Loose);
     _localSettings = MockObjectFactory.CreateLocalSettings(global: _settings.Object, factory: _factory);
     _incrementalSearch = _factory.Create<IIncrementalSearch>();
     _incrementalSearch.SetupGet(x => x.InSearch).Returns(false);
     _buffer = _factory.Create<IVimBuffer>(MockBehavior.Strict);
     _buffer.SetupGet(x => x.ModeKind).Returns(ModeKind.Command);
     _buffer.SetupGet(x => x.TextView).Returns(_textView.Object);
     _buffer.SetupGet(x => x.LocalSettings).Returns(_localSettings.Object);
     _buffer.SetupGet(x => x.IncrementalSearch).Returns(_incrementalSearch.Object);
     _caret = _factory.Create<IBlockCaret>(MockBehavior.Strict);
     _caret.SetupSet(x => x.CaretDisplay = CaretDisplay.Invisible);
     _caret.SetupSet(x => x.CaretOpacity = It.IsAny<double>());
     _controller = new BlockCaretController(_buffer.Object, _caret.Object);
 }